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 ▸

Create a program that takes in two numbers and returns the highest of the two


Explain how you would write a python program that takes a rectangle and a point in a 2D space as command-line arguments and checks if they intersect.


What does __init__ mean?


Write a recursive function that takes any integer n and prints the nth Fibonacci number.