Exercise 3 Write a complete Python program including minimal comments (ile name,
ID: 3669296 • Letter: E
Question
Exercise 3 Write a complete Python program including minimal comments (ile name, your name, and problem description) that solves the following problem with the main function: Problem Specification: Write a program that asks the user for a score which ranges between 0 and 100 inclusive. Your program should print a message whether the number is valid or not as shown in the sample runs. You program should display an appropriate input prompt as shown in the sample runs. Sample run #1: Enter a score (e to 100): 75 75 is a valid number. Sample run #2: Enter a score Co to 100): 10 -10 is an invalid number, The number should be between e and 100 inclusive Sample run #3: Enter a score co to 100) 100 Enten a score (e to 100): 100 100 is a valid number Sample run #4 : Enter a score (0 to 100):3 110 110 is an invalid nümber. The number should be between 0 and 100 inclusive Programming Instruction 1. Create a source file called exercise7p3.py using the file editor in idle3 2. Write the program that performs the program specification am in the newly nonned window. while make sure vau nut minimaExplanation / Answer
# This program adds two numbers provided by the user
# Store input numbers
n = int(input('Enter first number: [0-100] : '))
if n >= 0 and n <= 100:
print("{0} is valid number".format(n))
else:
print('{0} is invalid number'.format(n))
print('The number should be between 0 and 100 inclusive')
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.