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
This tag element is the last one used in the html code sequence
satela [25.4K]

Answer:

Looking closely at the HTML code sequence, it does seem that the tag element is the endpoint from where the HTML form gets the input, like input boxes, checkboxes, radio buttons, etc. And hence it is correct to say that the tag elements are the last one used in the HTML code sequence. And in the HTML code sequence head title script and styles comes at the top, and hence we mention the script or the Javascript code basically at the last, such that the HTML code or the web page run one time at least.

Explanation:

Please check the answer section.

3 0
4 years ago
LITERALLY PLS ANYONE!!! 90 pointsss!
Doss [256]

7. Intentional Virus Setting is when you the user purposely spread computer viruses in order to do harm. It should be noted that this is highly illegal (no duh) with a sentence of up to 10 years and $250,000 in penalties assuming you are convicted under the Computer Fraud and Abuse Act of 1986 here in the States.

8. intrusion of solitude, appropriation of name or likeness, public disclosure of private facts, and false light.

9.  Intentionally creating and/or sending a virus and infecting people's computers is against the law, and can result in jail time or a fine.

10. Some examples are: Deception - Lying about how information will be used. Violation of confidentiality - Disclosing someone's personal information without consent. Intrusion - Interference in an employee's personal life. Misappropriation - Using a person's likeness to promote a product without his consent.

11. Everyone wants PRIVACY for themselves, and everyone wants ACCOUNTABILITY from others. Privacy is a basic human need, and invasion of privacy can have serious psychological and emotional consequences, including paranoia, anxiety, depression and broken trust. Invasion of privacy is both a legal and an ethical issue.

12. A cause of action for invasion of privacy entitles the plaintiff to recover damages for the harm to the particular element of his or her privacy that is invaded. Thus, one who suffers an intrusion upon his or her solitude or seclusion, may recover damages for the deprivation of his or her seclusion.

13. An acceptable use policy (AUP) is a document stipulating constraints and practices that a user must agree to for access to a corporate network or the Internet. Many businesses and educational facilities require that employees or students sign an acceptable use policy before being granted a network ID.

14. Intellectual property refers to creations of the mind: inventions; literary and artistic works; and symbols, names and images used in commerce. Intellectual property is divided into two categories: Industrial Property includes patents for inventions, trademarks, industrial designs and geographical indications.

PLEASE PLEASE PLEASE HELP WITH MY RECENT!!!!!!

btw hope this helps if it does please make brainliest :)

6 0
3 years ago
Read 2 more answers
assume for arithmetic, load/store, and branch instructions, a processor has CPIs of 1, 12, and 5, respectively. Also assume that
KonstantinChe [14]

Answer:

1 PROCESSOR :

(1 × 2.56 × 10^9) + (12 × 1.28 × 10^9) + (5 × 2.56 × 10^8) / 2 GHz = 9.6 s

2 PROCESSORS :

(1×2.56×10^9)+(12×1.28×10^9)/0.7×2 + (5 × 2.56 × 10^8) / 2 GHz = 7.04 s

Speed -up is 1.36

4 PROCESSORS :

(1×2.56×10^9)+(12×1.28×10^9)/0.7×4 + (5 × 2.56 × 10^8) / 2 GHz = 3.84 s

Speed -up is 2.5

5 PROCESSORS :

(1×2.56×10^9)+(12×1.28×10^9)/0.7×8 + (5 × 2.56 × 10^8) / 2 GHz = 2.24 s

Speed -up is 4.29

Explanation:  

The following formula is used in this answer:

EXECUTION TIME = CLOCK CYCLES / CLOCK RATE

Execution Time is equal to the clock cycle per clock rate

7 0
3 years ago
Can someone seriously help out please!!!
sineoko [7]

Answer:

1st and last options

Explanation

7 0
4 years ago
Most operating systems today primarily use a ____.
LenKa [72]
Screen made of pixels? Right?
3 0
4 years ago
Other questions:
  • A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
    9·1 answer
  • If electricity comes from electrons, does morality come from morons?
    9·2 answers
  • Write a program that opens a text le called quiz.txt for reading. This le contains a single line with a student's rst name then
    15·1 answer
  • Which of the following actions would help people determine their interests?
    11·1 answer
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • Contextual targeting method mean
    11·1 answer
  • A PenTester has successfully exploited a remote host on a clients’ network. They want to create a backdoor on the host for futur
    11·1 answer
  • What is entered into a cell that is typically numeric and can be used for calculations?
    9·2 answers
  • How can I restore tabs that just unexpectedly close out of nowhere ?
    6·1 answer
  • What is the current situation in farming​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!