Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python programming Exercise 1. 10 points Write the code that completes the following tasks: - Accepts the user input for an integer. - Check if
python programming
Exercise 1. 10 points Write the code that completes the following tasks: - Accepts the user input for an integer. - Check if the input is a value between and 10 inclusively. - If the number is between 0 and 10 displays a positive validation message. - If the number is less than 0 or greater than 10 displays a notification that the number is not between the allowed limits. - If the number is not between the allowed limits the program should repeat a maximum of 3 times. - Comment with description of what each statement does - First line of the program should be a comment with your name and student number Exercise 2. 10 points Write the code that completes the following tasks: - Accepts the user input for an integer between 0 and 12 - Use a loop to calculate and display the division between the integer and the numbers between 0 and 10. (UserNumber / 0 ... 10) - Comment with description of what each statement does Exercise 3. 10 points Write the code that completes the following tasks: - Ask the user to enter an integer - Calculate the factorial value of that number and display it. Factorial of a positive integer n is the product of all positive integers less than or equal to n. - Comment with description of what each statement does. Exercise 4. 10 points Write the code that completes the following tasks: - Get user input for the amount of product X a user has bought (expect a potential float input) - Get the user input for the price per unit for product X (expect a potential float input) - Validate the user input to ensure that the user has entered a positive number for the amount of product X but no more than 100 units. - Validate the user input for the price per unit o be a positive number. - Calculate the total invoice considering that if the amount if equal or greater than 50 units of product he buyer will get a discount of 10%. - Comment with description of what each statement does Exercise 5. 10 points Consider you have the following list: feathered_pets = ["canary", "parrot", "budgie", "hawk"] - Write the code that allows a user to add a feathered pet to liat an ta liat all mate Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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