First TP workshop
Write a Python program using the condition statement an if...else that does the following:
-
Ask the user to enter the name and height of two people.
-
Compare their heights.
-
If one person’s height is greater than the other’s:
-
Display the name of the taller person.
-
Calculate and display the difference in height between the two people.
-
Use the function
abs()to get the positive value of the difference.
-
-
Print a message like: “Amir is taller than Mahdi with a difference of 20 cm.”
Instructions of the work:
Take clear screenshots of your Python code.
Make sure to include your real name inside the code (for example, in a comment or print statement).