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
Alina [70]
3 years ago
6

Ask the user to input a number less than 100. Print all the numbers from that number to 100.

Computers and Technology
2 answers:
Ber [7]3 years ago
8 0

Answer:

The second one:

num = int (input("Enter a number between 1 and 100: "))

c = num

while (c <= 100):

print (c)

c = c + 1

Explanation:

First of all, you don't know Python... (LEARN IT)

Second of all, The first loop doesn't make sense? num 100

And the second one works, you can try compiling it (lazy to explain...).

gtnhenbr [62]3 years ago
5 0

Answer:

num = int (input("Enter a number between 1 and 100: "))

c = num  

while (c <= 100):

  print (c)

  c = c + 1

Explanation:

You might be interested in
if you want to present slide to fellow student or co-workers, wich productivity software should you use to create them?
Reika [66]
Microsoft PowerPoint
6 0
3 years ago
Please assist me with these questions - Do not send me links. Issues in opening the links:
Thepotemich [5.8K]

Answer:

15) Halo 2

17) Sims

18) B

19) A

20) B

Explanation:

3 0
3 years ago
Give an example of an if/else statment and a case statment that are equivalent. Your example should contain at least three choic
zimovet [89]

Answer:

The if - else and equivalent switch case statements in c++ language are given below.

if ( ch == 1 )

       cout << " sum is " << x + y << endl;

   else if ( ch == 2 )

       cout << " difference is " << x - y << endl;

   else if ( ch == 3 )

   {

       cout << " Quitting " << endl;

       exit;

   }

switch( ch )

   {

       case 1 :    cout << " Sum is " << x + y << endl;

                   break;

       case 2 :    cout << " Difference is " << x - y << endl;

                   break;

       case 3 :    cout << " Quitting " << endl;

                   break;

   }      

Explanation:

The above statements use three variables which are declared and initialized as shown.

int x = 10;

    int y = 25;

    int ch;

The above statements execute for of addition, subtraction or to quit the program.

cout << " 1. Addition " << endl;

    cout << " 2. Subtraction. " << endl;

    cout << " 3. Quit " << endl;

    cout << " Enter your choice " << endl;

The variable ch holds the numerical option entered by the user.

    cin >> ch;

For if - else statements, the if statement is executed based on the value of variable ch entered by the user. After execution, the compiler goes out of the statements automatically.

Following the if – else, if any statement is present, it will be executed.

For switch case, every case ends with break keyword. After the required case is executed based on the value of variable ch entered by the user, the break statement is executed which causes the switch case to terminate the control goes out of the statements.

Following the switch case, if any statement is present, it will be executed.

4 0
3 years ago
8. Why is it important not to download pictures to your school or workplace network if you do not plan to use them?
Anni [7]

Answer:

not appropriate use of technology.

Explanation:

7 0
3 years ago
Who are The Boys? EddieVR, YourNarrator, JoshDub, Mully, and last but most certainly not least, Juicy(FruitSnacks). Green gang o
malfutka [58]

Answer:

yes or no

Explanation:

6 0
3 years ago
Other questions:
  • To prevent injury when pulling a nail be sure the material holding the nail is
    14·1 answer
  • Write the definition of a function named printstarbucks that receives a non-negative integer n and prints a line consisting of n
    6·1 answer
  • Alex builds a 1 GHz processor where two important programs, A and B, take one second each to execute. Each program has a CPI of
    6·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    13·1 answer
  • What two benefits are a result of configuring a wireless mesh network? Check all that apply.
    12·1 answer
  • In the GO programming language you can't declare a float, it must be a float32 or float64. Why do you think this is done if the
    10·1 answer
  • Any correct answers will be helpful.
    13·1 answer
  • This ICT can someone do it for me in scratch
    9·1 answer
  • Limited time only for christmas give yourself free 100 points YES YES yes yes yes
    6·2 answers
  • Assume that the Vehicle class contains a virtual method named CalculateMaxSpeed(). Assume that both the MotorVehicle and Automob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!