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]
3 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]3 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 the lan protocol architecture the _________ layer is responsible for detecting errors and discarding any frames that are in e
Korolek [52]
The MAC (Medium Access Control) layer is responsible for this.
7 0
3 years ago
Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and re
marissa [1.9K]

Answer:

In Java:

The method is as follows:

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {  

       int count = 0;

       for (int i = 0; i < MyList.size(); i++)  {

           if(MyList.get(i)>=min && MyList.get(i)<=max){

               count++;

           }  

       }

       return count;

 }

Explanation:

This defines the method

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {

This declares and initializes count to 0  

       int count = 0;

This iterates through the ArrayList

       for (int i = 0; i < MyList.size(); i++)  {

This checks if current ArrayList element is between min and max (inclusive)

           if(MyList.get(i)>=min && MyList.get(i)<=max){

If yes, increase count by 1

               count++;

           }  

       }

This returns count

       return count;

 }

To call the method from main, use:

countInRange(v,m,n)

<em>Where v is the name of the ArrayList, m and n are the min and max respectively.</em>

6 0
3 years ago
How to fix the acount when it says "Uh oh, this account has been restricted because of an unusual amount of activity.
likoan [24]

Answer:

Make sure that the email is verified. Also, usually sites do this when there are multiple log ins on multiple devices. It makes the site think that you are in multiple places at once making it seem suspicious. What i would do is clear cache and change the email and password associated with the account. If all fails contact brainly support

7 0
3 years ago
Your sister has just emailed you an attached file with the invitation list for her upcoming party.
Andreyy89

Answer:

The file Extension so the answer is C

5 0
3 years ago
Read 2 more answers
Jane wants to add a chart to her presentation so she’ll click the Insert tab and in the Images group, she’ll click the Chart but
kap26 [50]

(A. Stevie only) because You need to go the illustrations tab in order to click on the chart button.

Jane clicked on images tab so she was wrong.

Mark as brainlest plz :)

3 0
3 years ago
Other questions:
  • Information Can Be Gathered Regarding The Temperature Of A Substance And Uploaded To A Computer Using A ___________ As A Data Co
    6·1 answer
  • Using the expected format, of putting key information where the reader can’t find it, is an example of?
    8·2 answers
  • Bob received a message from Alice which she signed using a digital signature. Which key does Bob use to verify the signature?Gro
    13·1 answer
  • An attempt to exploit a vulnerability of a computer or network component is the definition of ________.
    15·2 answers
  • What are 7 key traits for knowing your audience
    6·2 answers
  • Write a program that includes functions to calculate feet to inches, inches to feet, feet to yards, and yards to feet. Then, acc
    9·2 answers
  • A customer in a store is purchasing five items. Write a program that asks for the price of each item, and then displays the subt
    8·1 answer
  • In dos operating system ,write a command to delete the directory as well as the files of the directory ''world'' on drive E.
    15·1 answer
  • A(n) ________ is a way of retrieving information from one or more tables that defines a particular subset of data.
    6·1 answer
  • "a web client that connects to a web server, which is in turn connected to a bi application server, is reflective of a"
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!