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
Oxana [17]
3 years ago
6

Write a program that prints the number 1 through 10 using a while loop

Computers and Technology
1 answer:
vova2212 [387]3 years ago
7 0
Which programming language are you working in?

Here is how you could achieve this in Python:

establish a counter, starting at 1.
While your counter is 10 or less, do two things:
print the counter,
and increase the counter by 1.

code:
counter = 1

while counter <= 10:
print(counter)
counter = counter + 1

Those last two lines should be indented.
You might be interested in
There is a flashing yellow light at the intersection you are approaching. What does the flashing yellow light indicate, and what
Ilia_Sergeevich [38]
The flashing yellow light indicates that people should be aware of other cars and turn carefully. To be more safe, you should slightly slow down, make sure all signals that should be on are on, and you should drive very carefully.
6 0
3 years ago
Microsoft edge is a web browser that was designed as an add-in to internet explorer. true or false
arsen [322]
"add-in" is pretty ambigious but I would go with true for this one.
7 0
3 years ago
Find and fix the error in the if-else statement. import java.util.Scanner;
salantis [7]

Answer:

Hi there Rumanruxi! The error is in the if statement "if(userNum = 2)".

Explanation:

The if statement in this Java code is assigning userNum the value of 2 instead of comparing it with the value of 2. For equals comparison we need to write two equals "==" in the statement as: "if (userNum == 2)". This will return true if userNum is 2 otherwise it will return false.  

3 0
3 years ago
Read 2 more answers
What are the possible consequences of invasion of privacy?
Sergio039 [100]
Jail time since you can be considered a spy or a perv. Whatever you aim is of course.
7 0
3 years ago
Use the table on the right to convert from decimal to hexadecimal.
leva [86]

Answer:

what is the question and answers?

3 0
3 years ago
Read 2 more answers
Other questions:
  • Im trying to learn c# for unity does anyone know any good sources
    10·1 answer
  • Compare and contrast the following network types: Personal Area Network (PAN) Local Area Network (LAN) Metropolitan Area Network
    14·1 answer
  • Which of the following loop conditions will read all the data in the file assuming that each line in the file contains two integ
    5·1 answer
  • The ability of services to grow or shrink based on need is called __________.
    14·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • Write a program that asks the user to enter a student's name and 8 numeric tests scores (out of 100 for each test). The name wil
    13·1 answer
  • In an MLA style citation for an image, what information should be listed first? A. The name of the creator B. The title of the i
    8·2 answers
  • Fill in the word to complete the sentence.
    10·1 answer
  • True or false? To help improve SEO, your URL should match the title of your blog post, word for word.
    12·1 answer
  • Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all intege
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!