Code: Select all
age = int(input("What is your age?"))
# The author wants the age as an integer value 'int'.
# For some reason, the code author changes his mind and wants the variable in decimal form, so a typecasting to float is needed.
age = float(age)
print(f"Your age is {age}")
# Displays the sentence: "Your age is (whatever you typed)."
# Let's say he/she wanted the code done correctly from the start.
age = float(input("What is your age?"))
print(f"Your age is {age}")
# Does the same thing.
