Define a function that takes in the age of the user and adds it to an output sentence such as "You are ..... old".

def userName(): age = int(input("How old are you? ")) print(("You are {} old.").format(age))userName()

LR

Related Python Mentoring answers

All answers ▸

What can be used to iterate through a list in python?


How could I write a program to convert Km/h to m/s in python


Which four data types are used in Python? Can you give an example of each?


How do I use format python code?