Answered step by step
Verified Expert Solution
Question
1 Approved Answer
!]: M # 2]: a. Write a program using for loop to print all odd numbers between 0 and 16. (2 points) 3]: b.
!]: M # 2]: a. Write a program using for loop to print all odd numbers between 0 and 16. (2 points) 3]: b. Write a program using for loop to print all even numbers between 20 and 0 inclusively (largest to smallest). (3 points) #Your Code Here c. Write a program in which you ask user to enter positive numbers in a loop. Loop should end when user enters a negative number. When loop ends print (i) average of all valid positive numbers entered by user, (ii) smallest valid number entered by user and (iii) largest valid number entered by user. Please do not use any language constructs (like Arrays etc) that we have not studied so far. (5 points) #Your Code Here d. Write a program where you ask user to enter a positive integer and then you print table like shown below. (5 points) Suppose user entered 12 then your program should print following table 1 x 12 = 12 2 x 12 = 24 3 x 12 = 36 4 x 12 = 48 5 x 12 60 6 x 12 = 72 7 x 12 = 84 8 x 12 = 96 9 x 12 = 108 10 x 12 = 120 =]: #Your Code Here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
aHeres the program using a for loop to print all odd numbers between 0 and 16 in Python The ra...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