1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iVinArrow [24]
2 years ago
11

Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each nu

mber on a separate line. Expected Output:
3
6
9
12
15
18
21
Computers and Technology
1 answer:
nexus9112 [7]2 years ago
6 0

Code:

num = 3

while num <= 21:

   print(num)

   num+=3

Output of code:

3

6

9

12

15

18

21

Explanation:

The condition num <= 21 will ensure that the program will only print multiples of 3 up to 21. We set num as 3 since we want to start printing from 3, and we add 3 each time to get the multiples.

Hope this helps :)

You might be interested in
In a five-choice multiple-choice test, which letter is most often the correct
tatiyna

I believe the answer is C.

5 0
3 years ago
Read 2 more answers
7. Write a Qbasic program to read the value
Shtirlitz [24]

Answer:

PRINT "Values for Principal (P), Rate (A) and Time (T)"

INPUT P, A, T

I = P * A * T/100

Amount = P + I

PRINT "Interest: ", I

PRINT "Amount: ", Amount

Explanation:

This prompts the user for values for Principal, Rate and Time

PRINT "Values for Principal (P), Rate (A) and Time (T)"

This gets values for Principal (P), Rate (R) and Time (T)

INPUT P, A, T

This calculates the interest (I)

I = P * A * T/100

This calculates the amount (A)

Amount = P + I

This prints the interest (I)

PRINT "Interest: ", I

This prints the amount (A)

PRINT "Amount: ", Amount

4 0
2 years ago
The open items on your computer are displayed here. menu bar open bar taskbar toolbar
Dennis_Churaev [7]
Maybe the answer is the Taskbar?
8 0
3 years ago
Read 2 more answers
A citizen of any group both
erastovalidia [21]

Answer:

Rights and Responsibilities

Explanation:

4 0
2 years ago
when I was playing Mobile legends bang bang online Match The game logged Me out and when I was Trying To reconnect it failed and
Helen [10]

Answer:

it's most prolly a bug.The game crashes a lot tbh

5 0
3 years ago
Other questions:
  • A(n) ____ is a client, server, or other device that can communicate over a network and is identified by a unique number, known a
    10·1 answer
  • A book of the Law was found in the Temple, which was being repaired, during what year of Josiah's reign.
    15·2 answers
  • What is the automotive name for the large wires that allow more electrical current to flow ?
    12·1 answer
  • In which situation will file compression be required to complete the task
    15·1 answer
  • The function below takes one parameter: a string (date_string) containing a date in the mm/dd/year format. Complete the function
    11·1 answer
  • Olivia is trying to save for a new laptop computer. To help her save, she should start a _____. database financial statement per
    7·2 answers
  • Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o
    8·1 answer
  • If you decide you want to meet someone you met online, what should you do first? A. Tell your best friend. B. Call the person yo
    12·1 answer
  • What<br>are<br>the features of secondary storage media​
    13·2 answers
  • How are most databases organized?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!