Question: Lab: Write a program to print out the squares of numbers, which are ended with 5, including 5, 15, 25, 35, 45, 55, 65, 75,

Lab:

Write a program to print out the squares of numbers, which are ended with 5, including 5, 15, 25, 35, 45, 55, 65, 75, 85, 95.

The output should be like a simple table, such as:

585 = 25

15*15 = 225

...

95*95 = 9025

****Make sure to print out a simple explanation about what the program is going to do.***** (This is what I need help on )

def squares5(): for x in range(5,100,5): print(x,"*",x,"=",(x*x))

squares5()

(Is this the correct answer ^ ? )

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!