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
jok3333 [9.3K]
3 years ago
8

What is the output of the following code snippet if the variable named cost contains 100? if cost < 70 or cost > 150 : dis

count = 0.8 * cost else : discount = cost print("Your cost is ", discount)
Computers and Technology
1 answer:
DanielleElmas [232]3 years ago
6 0

Answer:

The output is: Your cost is  100

Explanation:

Given

The above code snippet

and

cost = 100

Required

Determine the output of the code

if cost < 70 or cost > 150

The above condition checks if cost is less than 70 or cost is greater than 150

This condition is false because 100 is neither less than 70 nor is it greater than 150

So, the else statement will be executed.

discount = cost

Which means

discount = 100

So, the print instruction will print: Your cost is  100

You might be interested in
A(n) _____ is used to create a new file or to overwrite an existing file by attaching it to a command that produces output.
Alex787 [66]

Answer: Redirection symbol

Explanation: Redirection symbol/operator is the special operator that is used in programs along with commands. The operators that are generally used are ">",">>","I" and "<". These commands are given in the section of the DOS commands and other command prompt sections. This is the process where the changes in input feed and output is  analyzed and read through these commands.

3 0
3 years ago
You have recently subscribed to an online data analytics magazine. You really enjoyed an article and want to share it in the dis
creativ13 [48]

Select All that apply

Answer:

These are the things that are would be appropriate in a post.

B. Checking your post for typos or grammatical errors.

C. Giving credit to the original author.

D. Including your own thoughts about the article.

Explanation:

The correct answer options B, C, and D" According to unofficial online or internet usage it is believed that sharing informative articles is a reasonable use of a website forum as much the credit goes back to the actual or original author. Also, it is believed that posts should be suitable for data analytics checked for typos and grammatical errors.

7 0
3 years ago
GDP measures the production levels of any nation. This implies a correlation between production levels and ____________.
loris [4]
<span>C. Average Income ih ope this helps

</span>
4 0
3 years ago
Which device protects computer systems from voltage fluctuations?
wlad13 [49]
<span>A good quality device is an Uninterruptible Power Supply (UPS).</span>
6 0
3 years ago
What version of android did nexus one run?
gizmo_the_mogwai [7]
<span>2.1 Eclair perhaps.
sorry if it is wrong, but i think its correct

</span>
5 0
3 years ago
Other questions:
  • Which statement about creating folders is TRUE?
    15·2 answers
  • Identify any eight new programming languages and classify them based on their functionality.
    14·2 answers
  • QUESTION 9 of 10: Bob charged $200 for a plane ticket last month. When he received his statement, he saw that he could pay the m
    12·2 answers
  • Each sentence in the paragraph below has a number. Choose the number of two sentences that are in the wrong order in this story.
    14·1 answer
  • Teniendo en cuenta la realidad mundial acerca de la pandemia, ¿cómo crees que impacta
    9·1 answer
  • What is the full form of EPROM (CLASS-6)
    6·2 answers
  • What is an IF statement used for?
    12·1 answer
  • Which of the following are safety guidelines when socializing online?
    14·1 answer
  • // This pseudocode segment is intended to compute the number
    6·1 answer
  • if the wide area network (wan) is supporting converged applications like voice over internet protocol (voip), which of the follo
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!