subject

""" Multiply. py - This program prints the numbers 0 through 10 along
with these values multiplied by 2 and by 10.
Input: None.
Output: Prints the numbers 0 through 10 along with their values multiplied by
2 and by 10.
"""
head1 = "Number: "
head2 = "Multiplied by 2: "
head3 = "Multiplied by 10: "
NUM_LOOPS = 10 # Constant used to control loop.
print("0 through 10 multiplied by 2 and by 10" + "\n")
# Initialize loop control variable.
# Write your counter controlled while loop here
# Multiply by 10.
# Multiply by 2.
print(head1 + str(numberCounter))
print(head2 + str(byTwo))
print(head3 + str(byTen))
# Next number.
Summary
In this lab, you use a counter-controlled while loop in a Python program. When completed, the program should print the numbers 0 through 10, along with their values multiplied by 2 and by 10. The data file contains the necessary variable declarations and output statements.
Instructions
Make sure the file Multiply. py is selected and opened.
Write a counter-controlled while loop that uses the loop control variable (numberCounter) to take on the values 0 through 10.
In the body of the loop, multiply the value of the loop control variable by 2 and by 10. Remember to change the value of the loop control variable in the body of the loop.
Execute the program by clicking the "Run Code" button at the bottom of the screen.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:00, mathman783
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
image
Computers and Technology, 22.06.2019 08:40, baue4431
What are the three parts to physical security standards for various types of army equipment and the risk level
Answers: 2
image
Computers and Technology, 22.06.2019 17:30, cesargarcia17671
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
image
Computers and Technology, 22.06.2019 22:30, reinasuarez964
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
You know the right answer?
""" Multiply. py - This program prints the numbers 0 through 10 along
with these values mult...

Questions in other subjects:

Konu
History, 22.09.2019 21:20
Konu
World Languages, 22.09.2019 21:20
Konu
Mathematics, 22.09.2019 21:20