Write a python script that prompts the user to enter their full name, and age . Use the input function to assign the values entered
Write a python script that prompts the user to enter their full name, and age . Use the input function to assign the values entered by the user to a variable of string type for their name fullname, and a variable named age of int type for the age.. Your program should then use the print function to print
"Your name is ....." (fill in the blank with the users name (2 points))
"Your age is ..." fill in the blank with the users age , (2 points))
"Then length of your name is . " (use the len function to print the length of the name" (4 points)
Add comments to your program to show that you are requesting user name and using the len function. (2 points)
2. Use a for loop to prompt the user to enter five integer values. Your program should display the sum and average of these values. If the user enters the number 50, your program should terminate early using the sys.exit function.
Hint: You should first create a variable and call it any name you like, example sumvalue and assign it a value of 0 outside the loop.
Then in the loop, you should use the input function (look at ch1 pg 23 for this) to get the value from the user, hint:
print ("Enter a number")
numvalue = input()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started