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
castortr0y [4]
3 years ago
6

Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise.

Computers and Technology
1 answer:
taurus [48]3 years ago
4 0

Answer:

The modified program is as follows:

user_val = int(input())

cond_str = 'non-negative'  

if user_val < 0:

   cond_str = 'negative'  

print(user_val, 'is', cond_str)

Explanation:

This gets input for user_val

user_val = int(input())

This initializes cond_str to 'non-negative'

cond_str = 'non-negative'

If user_val is less than 0

if user_val < 0:

cond_str is updated to 'negative'

   cond_str = 'negative'  

This prints the required output

print(user_val, 'is', cond_str)

You might be interested in
Which of these are examples of skills?
Allushta [10]

Answer:

bruh

Explanation:

momento

8 0
3 years ago
Read 2 more answers
Which of the following is a way to add a foreground to a photograph?
kotegsom [21]

Answer:

reeee

Explanation: sry its actually raise you're perspective

3 0
3 years ago
Read 2 more answers
You are the manager and an employee shows up for his shift dressed inappropriately for work. What should you do?
yarga [219]

Most managers see inappropriate dressing every day. Some are left angered while some are confused as to what is the right way to approach such situations. What follows next needs to be professional oriented. Being the manager, I would start by finding out what the appropriate dressing policies are. Some companies might have dress code policies while others might not. Assuming that this company has, I would read these policies carefully. The next thing that is required from me is to have a small conversation with the employee discretely. As professional as I can be, I will mention how I feel his or her dress code is inappropriate and try to summon the employee by asking him or her whether they are fully aware of the appropriate dress code. I will try to agree with the employee on what is appropriate and what is not. If we agree, requesting the employee to home and change clothes is unnecessary, but if the need to do that arises, I would consider that to be an option.

7 0
3 years ago
Read 2 more answers
Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the
motikmotik

Answer:

a=[23,6,78,36,3,250,127,210,-5]

i = len(a) # calculate length

j = min(a) # calculate minimun

k = sum(a) # calculate sum

l= sum(a)/len(a)  # calculate mean

print(i)

print(j)

print(k)

print(l)

z = 0.0

i=0

x=[23,6,78,36,3,250,127,210,-5]

y = int(l)

while x[i] < y:  

   z= int(x[i]/y)

   print(z)

   x[i] = x[i] - y

   z=z+1

   i=i+1

Explanation:

So above we have calculated Count, minimum, sum and mean/average. Also we did a simple division and printed quotient.

5 0
4 years ago
What is the purpose of a subject in an email​
Nitella [24]

Answer:

that way people see the purpose of it. most people trash emails without a subject.

Explanation:

hope i helped

6 0
4 years ago
Read 2 more answers
Other questions:
  • A device that makes it possible for multiple customers to share one address is called a/n _____.
    15·1 answer
  • While ________ is centered on creating procedures, ________ is centered on creating objects. Procedural programming, class progr
    10·1 answer
  • Whoever answers int the next 15 minutes will get brainliest. To get brainliest, it also has to be the correct answer. 8 points r
    11·2 answers
  • Which term is used to describe a public-key, cryptography-based mechanism for proving the source (and possibly integrity) of a d
    12·2 answers
  • What is the decrypted binary
    9·1 answer
  • Why is computer called information processing maching???​
    6·2 answers
  • Write a program with the total change amount as an integer input, and output the change using the fewest coins, one coin type pe
    13·1 answer
  • What is a central idea for 3 Despite this lack of precision, Galileo had constructed a wonderful invention. Yet, he considered i
    5·1 answer
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
  • Which statement best describes a social impact of computing on the world?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!