Professional Documents
Culture Documents
Class06 Python Homework
Class06 Python Homework
1. Write a program that will output the line of text “I love Programming”, 10
times.
2. Write a program that will output the seven times table, as follows:
1 x 7 = 7
2 x 7 = 14
3 x 7 = 21 . . .
3. Write a program that will ask the user for a value and then print out the
tables for the inputted value.
4. Develop a program that will display to the screen the first 20 numbers,
with their squares and cubes, as follows:
1 1 1
2 4 8
3 9 27 .
.
Miles Kilometres
1 1.61
2 3.22
.
.
.
25 40.25
6. Write a program that will prompt the user to 6 numbers and then print the
number of positive numbers and the sum of negative numbers in the set.
7. Write a program to read 6 numbers and find the average of all odd numbers.
8. Write a program that will prompt the user to enter 5 numbers and then
print the smallest and largest number to the screen.