99.9k views
1 vote
Write a conditional that assigns 10,000 to bonus if the goods_sold is greater than 500,000.

Write a conditional that decreases the value associated with shelf_life by 4 if the value associated with outside_temperature is greater than 90.

User Ahoosh
by
8.2k points

1 Answer

2 votes

Final answer:

To assign a bonus of 10,000 if goods_sold is greater than 500,000 and to decrease shelf_life by 4 if outside_temperature is greater than 90, two separate conditional statements can be written in a programming language to evaluate these conditions.

Step-by-step explanation:

To write a conditional that assigns 10,000 to the variable bonus if goods_sold is greater than 500,000, you can use the following code structure in a programming language like Python:

if goods_sold > 500000:
bonus = 10000

The second condition involves decrementing the value of shelf_life by 4 if outside_temperature is greater than 90. That can be written like this:

if outside_temperature > 90:
shelf_life -= 4

These conditionals utilize an if statement to check if the conditions are met and then perform an action accordingly.

User Hakob Hakobyan
by
7.7k points

No related questions found