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
weeeeeb [17]
2 years ago
9

Write an expression that executes the loop while the user enters a number greater than or equal to 0.

Computers and Technology
1 answer:
anyanavicka [17]2 years ago
5 0

num = 1

while num >= 0:

   num = int(input("Enter a number greater than or equal to 0: "))

I hope this helps!

You might be interested in
after landing, you are tying down the aircraft when a person approaches and asks: "faa. are you the pilot of this aircraft?" wha
Elden [556K]
I wouldn’t say anything because no-one is allowed in the pilot room and also i am landing the aircraft down but the I would talk to them after the flight
3 0
2 years ago
5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
Dima020 [189]

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

    //Initialize the prices as constants

    final double PRODUCT_1_PRICE = 2.98;

    final double PRODUCT_2_PRICE = 4.50;

    final double PRODUCT_3_PRICE = 9.98;

    final double PRODUCT_4_PRICE = 4.49;

    final double PRODUCT_5_PRICE = 6.87;

   

    //Declare the other variables

    int productNumber, quantitySold;

    double total = 0.0;

   

    //Create a Scanner object to get input

    Scanner input = new Scanner(System.in);

   

    //Create a while loop

    while(true){

        //Ask the user to enter the productNumber

     System.out.print("Enter the product number or 999 to quit: ");

     productNumber = input.nextInt();

     

     // Stop the loop, if productNumber is 999(sentinel value, you may choose any value you want)

     if(productNumber == 999)

         break;

     

     //Ask the user to enter the quantitySold

     System.out.print("Enter the quantity sold: ");

     quantitySold = input.nextInt();

     

     //Create a switch statement that works depending on the productNumber entered.

     //For example, if the productNumber is 1, it multiplies the quantitySold by PRODUCT_1_PRICE

     //   and adds the result to the total. If productNumber is 2, it does the same for product 2 ...

     switch(productNumber){

         case 1:

             total += quantitySold * PRODUCT_1_PRICE;

             break;

         case 2:

             total += quantitySold * PRODUCT_2_PRICE;

             break;

         case 3:

             total += quantitySold * PRODUCT_3_PRICE;

             break;

         case 4:

             total += quantitySold * PRODUCT_4_PRICE;

             break;

         case 5:

             total += quantitySold * PRODUCT_5_PRICE;

             break;

     }

    }

 

 //Print the total (when the loop is done)

 System.out.println("The total is $" + total);

}

}

Explanation:

*The code is in Java.

You may see the explanation as comments in the code.

4 0
3 years ago
Wamna play mm2<br><br><br>imma send u my username​
SashulF [63]

Answer:

sure send it lol but how

6 0
2 years ago
George has a set of software programs installed on his computer to create a digital portfolio. He is not sure what each program
d1i1m1o1n [39]

Explanation:

I thinkcreating and edditing Images matchs to adobePhotoshop

Microsoft word is for adding and Creating text document

Creating andeditingpage layout -Adobe In Design

Desktop Publication-QuarkQuark Xpress

I hope thishelp and If wrong Inform me

Good luck

8 0
2 years ago
Read 2 more answers
What is the Dock?
Umnica [9.8K]
The place where most commonly used applications reside
3 0
3 years ago
Other questions:
  • Some financial institutions can be really bad about putting unexpected charges
    12·1 answer
  • The transport layer protocol used by the tcp / ip suite that does not provide guarantees on ordering or confirmation of receipt
    7·1 answer
  • What can a dimm use to hold data and amplify a signal just before the data is written to the module?
    12·1 answer
  • What is the cell membrane used for ​
    14·2 answers
  • Besides the Computer Inventory and Maintenance form, what other documentation should you keep on each computer? How might you st
    8·1 answer
  • A message M is encapsulated by the TCP, IP and Ethernet protocols in that order as it travels down a protocol stack. What does t
    5·1 answer
  • What is ambiguous grammar, explain in maximum 50words.
    5·1 answer
  • ______ is a customer-facing CRM application.<br><br> FAQ<br><br> Search<br><br> SFA<br><br> E-mail
    6·1 answer
  • Can an SQL function return multiple values? No answer needed, take the points.
    12·1 answer
  • A machine that converts energy to useful work.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!