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
DochEvi [55]
4 years ago
8

A store sells widgets at 25 cents each for small orders or at 20 cents each for orders of 100 or more. Write a program that requ

ests the number of widgets ordered and displays the total cost. (write the python program and after confirming it works, copy and paste the program code below)
Computers and Technology
1 answer:
arsen [322]4 years ago
5 0

Answer:

widgets=float(input("Enter number of widgets you want to buy"))

if widgets<0:

print("Can't compute negative number")

else:

if widgets<100:

cost=widgets*25

else:

cost=widgets*20

print("The total cost of widgets is", cost,"cents")

Explanation:

First I made a variable called widgets to take input of the number of widgets the customer wants to buy. I use the first comditional statement to test if the number of items typed in is not less than zero.

The else statement computed the prices of widgets based on number of widgets greater than zero.

Another conditional statement to check if the widgets is lower that 100 or greater. The cost represents the total amount, in terms of cost it will take for some nuber of widgets.

The last line prints the total cost and some statments

You might be interested in
Why is it a best practice of a remote access policy definition to require employees and users to fill in a separate VPN remote a
Anna007 [38]

Answer:

a.This helps with non-repudiation to ensure the user is who they claim to be and that they are authorized to access confidential organizational assets.

Explanation:

8 0
4 years ago
If someone you don’t know asks where you go to school, what should you do
My name is Ann [436]

Answer:

Don't answer him because you don't know what he is going to do

8 0
3 years ago
Your computer has two basic types of software: system software and ________ software.
Elan Coil [88]
Hi!

Our computers will have system software and application software. Application software would be something like a game or just any general purpose app you've downloaded.

Hopefully, this helps! =)
5 0
4 years ago
Which type of footwear should be worn while working on a hybrid vehicle?
Dmitrij [34]

Hello there!

Shoes with rubber souls would be the best bet.

7 0
3 years ago
Read 2 more answers
CPT (Current Procedural Terminology) codes consist of 3-4 numbers representing a unique service. True False
xz_007 [3.2K]
This is in fact false to my knowledge
4 0
4 years ago
Other questions:
  • In three to five sentences, describe how technology helps business professionals to be more efficient. Include examples of hardw
    10·1 answer
  • The underline format will underline ____.
    14·1 answer
  • A program that coaches you at each step in the process is said to have a(n)
    12·2 answers
  • : How does the founder of Wikipedia keep a tight reign on accuracy? HELP PLEZ AT LEAST A PARGRAPH PLES
    6·1 answer
  • What are the types of hypervisiors ?
    5·2 answers
  • Is it safe to take apart a computer monitor?
    13·1 answer
  • Which method of accessing FTP has the most limited capabilities?
    9·2 answers
  • A network security analyst received an alert about a potential malware threat on a user’s computer. What can the analyst review
    12·1 answer
  • What colorful format should you use to bring attention to an important sentence or phrase
    14·1 answer
  • which of the following can be represented by a sequence of bits. 1. An integer 2. An alphanumeric character 3. A machine languag
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!