menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
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
Ask a Question
Questions
Unanswered
Tags
Ask a Question
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
asked
Apr 2, 2023
15.9k
views
20
votes
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
Computers & Tech
college
Dan Gibson
asked
by
Dan Gibson
8.2k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
11
votes
Answer:
for x in range(1,20):
print(f'{x}-{(x**2)}')
HellaMad
answered
Apr 8, 2023
by
HellaMad
8.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
No related questions found
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org