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
sashaice [31]
2 years ago
5

Write an expression that executes the loop body as long as the user enters a non-negative number.

Computers and Technology
2 answers:
Orlov [11]2 years ago
8 0

Answer:

user_num >= 0 or 0 <= user_num

Explanation:

You want to use one of the comparison operators, to solve this problem, and in this case you're going to specifically use: >= or <=, which is "greater than or equal to" and "less than or equal to", either can be used, it just depends where you place the numbers, kind of like how 10 >= 3 and 3 <= 10 are both true.

So in this case it says "non negative" number, this means that the number is greater than or equal to 0, The reason the equal to is included is because 0 is not negative. this means that you want to include it as well. So don't do user_num > 0, since that would exclude 0, which is not negative. So you're solution for the while loop will be:

while user_num >= 0:

   # code

or you can do

while 0 <= user_num:

   # code

Although I would probably go with user_num >= 0, since it seems to be the most understandable at a glance, although both should work.

Grace [21]2 years ago
7 0

Answer:

user_num = 9

while user_num > -1:

 print("Body")

 user_num = int(input())

print("Done")

If this answer helped consider rating and marking brainliest :)

You might be interested in
What are the best data structures to create the following items? And why?
Airida [17]

Answer:

The best structures to create the following items are

  1. ARRAY
  2. HASHMAPS
  3.  QUEUE
  4. SORTED LINK LISTS

Explanation:

The best structures to create the following items are:

  1. Array : for the storage of cards in a card game the best data structure to be used should be the Array data structure. this is because  the size of the data ( 52 cards ) is known and using Array will help with the storing of the cards values in the Game.
  2. Hashmaps : Hashmap data structure should be implemented in online shopping cart this IS BECAUSE  items can be easily added or removed from the cart therefore there is a need to map the Items ID or name to its actual database
  3. online waiting list are usually organised/arranged in a first-in-first-out order and this organization is best created using the queue data structure
  4. Sorted link lists is the best data structure used to create, store and manage online tickets. the sorted link data structure helps to manage insertions and deletions of tickets in large numbers  and it also reduces the stress involved in searching through a large number of tickets by keeping the tickets in sorted lists
3 0
3 years ago
Lucinda is a network manager. She wants to set up a small office computer network so that it will not be affected at all by elec
Katena32 [7]

Answer:

The network media she should use is;

E. Shielded twisted-pair

Explanation:

A network connection that will not be affected by electrical or electromagnetic interference is a shielded twisted pair cable

Electromagnetic interference, EMI, is an externally originating disturbance that has an impact on electrical circuits through electromagnetic induction, direct conduction, or electrostatic coupling, with the possible effect of circuit degradation or disruption

EMI can be prevented by the use of shielded twisted pair (STP) cabling that provides a barrier that reduces the effect of external electromagnetic fields and transports the current induced to the ground through a grounding wire

4 0
4 years ago
What is emerging as a major business area of innovation that offers a flexible collection of computers on the Internet that can
Gemiola [76]

Answer:

Option (D) i.e., cloud computing is the correct answer to the following question.

Explanation:

The following option is correct because cloud computing is a better way to store our application, data, and programs on the internet with privacy and without storing them into the hard drives.  

So, that's why the following option is correct. It simple words, cloud computing provides us the facility to store data through the internet without storing them into the drive.

8 0
3 years ago
Intellectual ______ is the legal term for ownership of intangible assets such as ideas, art, music, movies, and software.
SOVA2 [1]

Answer:

<u>Property</u>

Explanation:

Intellectual Property (IP) is the lawful protection of human idea/intellect by unauthorised users. These human intellects are intangible assets that have both moral and commercial value. They include ideas, art, music, movies, software e.t.c.

Common types of Intellectual property include

  • Copyrights
  • patents
  • Trade Marks
  • Trade Secrets
5 0
3 years ago
Read 2 more answers
Which type of network topology connects multiple devices to a central device?
Morgarella [4.7K]
Star topology is your answer

6 0
4 years ago
Other questions:
  • 1.using synonyms can help make ur writing more________
    11·1 answer
  • Given the following code:
    9·1 answer
  • The this reference . a) can be used implicitly b) must be used implicitly c) must not be used implicitly d) must not be used 25)
    11·1 answer
  • Two positive outcomes generally associated with modern computing are greater _____.
    12·2 answers
  • 3.3 Code Practice: Question 1
    6·1 answer
  • A network adapter, also called a ____ when it is in the form of an expansion card, is used to connect a computer to a network.
    13·1 answer
  • What does a GPA show
    14·2 answers
  • 30 pts!<br> Explain how Moore's law presumes everyone will have access to the Internet.
    14·1 answer
  • Write the following abbreviations in full next to the question number
    15·1 answer
  • How do web-based applications and websites differ? (2 points)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!