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
Anuta_ua [19.1K]
4 years ago
14

Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha

s an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message.
Computers and Technology
1 answer:
madam [21]4 years ago
3 0

Answer:

           while (Num>=0) {

               System.out.println("enter a another number");

               Num = in.nextInt();

           }

Explanation:

The complete java code prompting a user to enter a number until a negative number is entered is given below:

import java.util.Scanner;

public class num6 {

public static void main (String [] args) {

Scanner in = new Scanner(System.in);

System.out.println("enter a number");

int Num = in.nextInt();

while (Num>=0) {

System.out.println("enter a another number");

Num = in.nextInt();

}

System.out.println("Done.");

return;

}

}

You might be interested in
What is the next line?
Contact [7]

The right answer is option 4: 2

Explanation:

Lists are used in Python to store elements of same or different data types.

Different functions are used in Python on List. One of them is count.

Count is used to count how many times a specific value occurs in a list.

The syntax for count is:

listname.count(value)

In the given code,

The output will be 2

Hence,

The right answer is option 4: 2

5 0
3 years ago
Which of the following is an acrostic
Darina [25.2K]
There is no option........................................
5 0
4 years ago
What happens if two functions are defined with the same name, even if they are in different arguments within the same .py files?
yan [13]

Answer:

Following are the code to this question:

def data(a):#defining method data that accepts parameter

   print (a)#print parameter value

def data(b):#defining method data that accepts parameter

   print (b)#print parameter value

x=input("enter value: ")#defining variable x that5 input value from user

print(data(x))#call method data

Output:

enter value: hello..

hello..

None

Explanation:

  • As the above code, it is clear defines that python doesn't support the method overloading because More than one method can't be specified in a python class with the same name and python method arguments have no type.
  • The single argument method may be named using an integer, a series, or a double value, that's why we can say that it is not allowed.
7 0
3 years ago
What is a taskbar?
shutvik [7]
To me, the answer would be A menu that list options available in a particular program.
Because, It a list of instructions you can make your computer do like copy, paste, and print.
4 0
3 years ago
Mike needs to export some animation videos from his smartphone to an online platform. Which common file format can he use for th
Anastasy [175]
The answer would be b
8 0
3 years ago
Other questions:
  • Assume that we would like to expand the MIPS register file to 128 and keep the size of all other fields as in the original MPIS
    7·2 answers
  • Where is the thesis statement usually located in resarch paper?
    14·1 answer
  • Make a program that prints each line of its input that mentions fred. (It shouldn’t do anything for other lines of input.) Does
    10·1 answer
  • A microphone plugs into what type of connector
    5·2 answers
  • Which database item would show details such as a customer’s name, their last purchase, and other details about a customer?
    11·2 answers
  • To insure QoS of a network, an alternative to “prioritizing traffic” is to __________, which means holding back traffic from non
    8·1 answer
  • On her last performance review, beverly's boss commented that she needs to help out her co-workers when they are busy in order t
    5·2 answers
  • The Fast as Light Shipping company charges the following rates. Weight of the item being sent Rate per 100 Miles shipped 2kg or
    13·1 answer
  • A program that organizes sequences of automated provisioning tasks. A. Application Packager B. Sequence Manager C. Sequence Logg
    14·1 answer
  • __________ is a software-enabled technique that can change the hardcoded mac address to any mac address and thus overcome mac ad
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!