Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions