CSC 105 Army Transportation & Aviation Logistics School Loops Python Project
Description
while and for loops
Write and test each program described below in the separate file .py, and then submit
each file on Canvas under the appropriate program number.
The program descriptions are given below:
- Write a Python program to draw the chessboard. (Hint: Draw first one row of the chessboard and then repeat it 8 times.
- Write a Python program to read a sequence of student scores, add 10 to each old score, and print each new score. The number of students is unknown, but if -99 is entered, it is not a valid score but a sentinel, i.e., it is the indicator of the end of the sequence.
Example of input:
66
77
-99
Expected Output:
76
87
End of program - Write a program that allows the user to enter a series of 3 numbers. Each number should be interpreted as a square side in inches (one square side in each loop iteration). The entered square side will be used to calculate the area of that square. Next, the square area should be printed.
Example of input:
2
3
5
Expected Output:
4
9
25
End of program
4.Write a program that first assigns to variable names = [“John”, “Mary”,
“Miriam”, “Denny”, “Sambit”] and then prints these names. The strings should be printed on separate lines (print one item in each loop iteration).
5. Write a program that allows users to enter a series of scores, one score in each round/iteration.
If an entered score is negative, the loop is terminated.
If an entered score is positive or zero, the message Valid score! is printed.
6. Write a program using the range function to generate
numbers between 40 and 43 (43 included). These numbers must be printed in separate lines (print one number in each loop iteration).
Expected Output:
40
41
42
43
End of program
7. Write a program that reads two numbers. Assume that the second number is greater than the first number. Print all numbers between the first number and the second number (second number included), Note: print numbers in separate lines.
Example of input:
2
5
Expected Output:
2
3
4
5
End of program
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."