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 ▸

Ask the user for a number and output the smallest divisor, bigger than one, for the inputted number. Output "Prime" if the number is a prime number.


Whats the output of "for i in "hello world": print(i)" and why/how is this achieved


How do I use for loops in Python?


Write a program that computes the sum of all numbers up to a input number n