Posted: November 4th, 2017
This is a practice activity that will prepare you for this module’s graded assignment. It is NOT graded but you must submit an attempt to this dropbox in order to have the solution file revealed to you. The task is to solve a problem with a Python program. After completing this activity and uploading your Python file, you will be able to view a video detailing an exemplary solutions provided by your instructor.
Two programs are required. In each program:
1. Write a Python program that uses a for loop with the range function to display the integers from 5 to 50 in increments of 5. See page 170-173 to learn about the range function. The program should also print the square and cube of each integer. Your output should print the a table with 3 columns and each column should be 7 characters wide. See page 72-73 for how to format integers. See also example output.
2. Write a Python program that prompts the user to enter an integer and reports whether the input was even or odd. Assume that the user follows instructions and enters only integers. The program must use a while loop and it should continue to execute until the user enters zero. See pages 144-146 to learn about sentinels.
Place an order in 3 easy steps. Takes less than 5 mins.