anjola2444 anjola2444
  • 13-07-2022
  • Computers and Technology
contestada


Write a program that prints out a list of the integers from 1 to 20 and their
squares. The output should look like this:
1-1
2-4
3-9
20-400

Respuesta :

Vortorix
Vortorix Vortorix
  • 13-07-2022

Answer:

for x in range(1,20):

   print(f'{x}-{(x**2)}')

Answer Link

Otras preguntas

Can someone help me?
Eduardo piensa en un número entre 1 y 20 que tiene exactamente 5 factores. ¿En qué número está pensando?
what force is required to accelerate a 10 kg mass at 5m/sec^2
From which colony did this group of Puritans come? A. Pennsylvania B. Virginia C. Massachusetts D. New York
Deidre is digging a pool for one of her clients.The perimeter of the pool is 36.7 feet.The client wants the length of the pool to be 3 times the width plus 1.5
Emily’s meal cost 32.75 and Darren’s meal cost 39.88 . Emily treats Darren by paying for both meals and leaves a 14% tip. Find the total cost
The French and Indian War was mainly fought between which of the following two groups? A. British and Canadian B. French and Spanish C. Mexican and Fre
Points S,U, and T are the midpoints of the sides of PQR. Which statements are correct ? 1/2QP=UT 1/2TS=RQ SU=PR SU||RP UT=RP
In standard sql, the optimizer hint first_rows is generally used for _____ mode processes.
How do you ask someone that you would like to have diner with them