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 ▸

Creating string from multiple strings(or characters)


What built-in types does python provide?


Give a segment of python code that will print the numbers 1 to 7, each one on a new line


Write a recursive function to return the nth Fibonacci number in Python