HandinYou may work in groups of up to 3. If so, hand in only ONE submission sheet. It will be assumed that all members of the group participated.
Assignment: (3 points)For each of the following snippets:
10) Write a program that asks the user to enter a number. After the user has entered a number, the word "Hello" should appear on screen that many times.
GET YOUR PROGRAM TO WORK ON THE COMPUTUER. Then, write your code on the back of the lab sheet.
PRACTICE:These are for practice and not to be turned in.
a) Modify program from number 10 that if the user types in a negative number they are re-prompted until they type in a positive number. THEN, "hello" gets printed on screen that many times.
b) Write a program that asks the user to enter the purchase price of an item, and the amount tendered. IF the amount tendered is less than the purchase price, let them enter a new number. The program should repeat asking them for new numbers until the amount paid is high enough. However, the program should not let them try more than 5 times.
c) Write a program that writes the numbers 1-50 on the screen. However, the numbers 1-10 s hould be in the first column, 11-20 in the next column, ... 41-50 in the fifth column.
d) Write a program that asks the user for 20 numbers and reports their average to the screen.