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
Python Programming
Phoenix [80]

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

8 0
2 years ago
I need help making this table in html code I have some of chart done but idk where to go after the 6:30pm part
Bumek [7]

dvioubfeevuf is hsvqvuvsqv

5 0
3 years ago
Cell references in a formula are called _____.<br> a. assumptionsc. numbersb. valuesd. content
Airida [17]
It would bbe d because content is what is in something
7 0
3 years ago
Explain the history of America ​
Tomtit [17]

Explanation:

The history of the United States is what happened in the past in the United States, a country in North America. ... They won the Revolutionary War and started a new country. They signed the constitution in 1787 and the Bill of Rights in 1791.

Military conflict

8 0
3 years ago
Read 2 more answers
HELP PLEASE
GREYUIT [131]

Answer:

D, storyboard

Explanation:

5 0
3 years ago
Other questions:
  • As the driver it is not your responsibility that you are focused on the driving task with any possible distractions minimized. T
    9·2 answers
  • Suppose you find a magic $1.00 coin. Its magic power is as follows: as each day passes, you get an additional dollar plus half o
    6·1 answer
  • When a user runs an application, what transfers from a storage device to memory?
    8·1 answer
  • I need help also this counts as my second giveaway and last for today
    12·2 answers
  • Functionality testing is primarily used with ____________. firewall protection software development hardening servers server tes
    8·1 answer
  • Four examples of computer virus​
    10·1 answer
  • Which command os used to find a particular word in a document ?<br>​
    9·2 answers
  • MSWord is a popular___________ program.​
    7·2 answers
  • As part of your regular system maintenance, you install the latest operating system updates on your Windows 10 computer. After s
    12·1 answer
  • "necessarily is the mother of computer " justify this statement with respect to the evolution of computer.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!