Answer:
I can give you the perimeter "algorithm" but not the flowchart.
Here you go:
p = w * 4
p = perimiter,
w = width/height
4 = the amount of sides needed.
perimeter = width * 4
to include both width and height, we would instead use:
perimeter = 2(width+height)
This also works with rectangles ^
--------------------------------------------------------------------------
To find an area, it is just width * height. This is also compatible with rectangles.
Answer:
primul_copil = int(input("Introduceți vârsta primului copil: "))
aldoilea_copil = int(input("Introduceți vârsta celui de-al doilea copil: "))
def copilmai_mare(varsta1, varsta2):
if varsta1 > varsta2:
diferenta = varsta1 - varsta2
print("copilul mai mare este varsta1 cu diferența de vârstă de: ", diferenta )
else:
diferenta = varsta2 - varsta1
print("copilul mai mare este varsta2 cu diferența de vârstă de: ", diferenta )
copilmai_mare(primul_copil, aldoilea_copil)
Explanation:
Programul python de mai sus definește o funcție "copilmai_mare" care ia două argumente "varsta1" și "varsta2". Diferența dintre vârstele copiilor este comparată, iar cel mai mare copil și diferența sunt tipărite pe ecran.
It's usually called "Booting Up"
Booting up is usually the process in which you usually refers to the computer loading up basic software to the computers memory.
Answer:
In Python:
numberOfWholeSlices = int(22/7)
print(numberOfWholeSlices )
Explanation:
For each friend to get a whole number of slices, we need to make use of the int function to get the integer result when the number of slices is divided by the number of people.
So, the number of slice is: 22/7
In python, the expression when assigned to numberOfWholeSlices is:
numberOfWholeSlices = int(22/7)
Next, is to print the calculated number of slices
print(numberOfWholeSlices )