Question: Task 2: For this part you will need to write a Python program, named squares py, that prints a list of the first six odd

 Task 2: For this part you will need to write a

Task 2: For this part you will need to write a Python program, named squares py, that prints a list of the first six odd positive integers and their squares. Your output should look similar to the one provided at the end of the description: Implement this code in steps: o Step1: Open IDLE, then from the menu choose File New File Save as... and o Step2: Write a while-loop that will repeat six times and the body of the loop will be printing one o Step3: update the previous loop so that it prints in each line, the number and the square of the use name squares.py. Make sure you save this file in "lab4" folder. positive integer in each line. number, e.g. 16 o Step4: Inside the body of the loop, include an if-statement to check if a number is odd (Hint: use the modulo (%) operation.) Since you only want to print only odd numbers (and their squares) in your final output, you should make sure that the printtaement from Step2, is part of the body of the if- statement. o Step5: Add another print statement BEFORE the loop, to print the 1 line shown in the final output shown below FINAL OUTPUT Number Square 25 49 81 121

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!