answer.
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
Dominik [7]
2 years ago
14

The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $

10.00 or more and $3.00 otherwise. Three kinds of gasoline are available: regular at $2.89, plus at $3.09, and super at $3.39 per gallon.
Write a program that prints a statement for a customer.

Input consists of number of gallons purchased (R, P, S, or N for no purchase), and car wash desired (Y or N). Gasoline price should be program defined constant. Sample output for these data is


Enter number of gallons and press 9.7

Enter gas type (R, P, S, or N) and press R

Enter Y or N for car wash and press Y
Computers and Technology
1 answer:
beks73 [17]2 years ago
7 0

Answer:

d = {"R":2.89,"P":3.09, "S":3.39, "N":0}

noofgallons = input("Enter number of Gallons:")

gastype = input("Enter Gas type/; R,P,S,N")

cwr = input("Is Car Was Requieed")

if(gastype == "R"):

   gal == nooffgallons * d['R']

   if (cwr=="y" and gal<10):

       gal+=3.00;

       elif(cwr=="y" and gal>=10):

           gal+=1.25

           elif(cwr=="n"):

               gal=gal

   elif(gastype==P):

       gal== nooffgallons * d['P']

       if(cwr="y" and gal<10):

           gal+=3.00;

           elif(cwr=="y"and gal>=10):

           gal+=1.25

           elif(cwr=="n"):

               gal=gal

       elif(gastype ==S):

           gal=noofgallons *d['S']

           if(cwr="y" and gal<10):

               gal+=3.00;

               elif(cwr=="y"and gal>=10):

                   gal+=1.25

                   elif(cwr=="n"):

                       gal=gal

                       

                       

print("tptal cost paid"+ gal)

The above program uses a dictionary for storing gasoline types and their cost, and dictionary is always constant, and hence its fulfilled the requirement of keeping it constant. And car wash is treated accordingly. And if elif else ladder has been used to calculate the total number of gallons.

Rest part is self explanatory.

Explanation:

The code is self explanatory.

You might be interested in
A _______ bulb contains a high-pressure gas. Oils from the hands can affect the expansion of the glass, which can shorten the li
shusha [124]

Answer:

I'd go with the 2nd one

If it heats up more & more, then it's lifespan will be shortened more & more.  The more it heats up, the less durability it has.

6 0
2 years ago
Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
erastova [34]

Answer:

Mercury, rontgen rays, etc.

Explanation:

There are lots of answers to this question, hope these two help.

6 0
1 year ago
A regional bank implemented an automated solution to streamline their operations for receiving and processing checks/cheques. Th
Sphinxa [80]

Answer: Machine learning

Explanation:

The technology that could be combined with the current solution to do this is the machine learning.

Machine learning refers to the use and development of the computer systems which can learn and adapt without them following explicit instructions. This is done through the use of statistical models and algorithms in order to analyse inferences from the patterns in data.

Since the bank wants to streamline their operations for the receiving and processing checks while also enhancing the solution to recognize signs of potential check fraud, then the machine learning can be used.

3 0
2 years ago
Explain what all sensory receptors have in common.
sp2606 [1]
The correct answer is that all receptors are considered to have the same feature, which is being a transducer.

Transducers change vitality starting with one form then onto the next. Generally, the receptor cells don't create an activation impulse by themselves. Rather, they create a progressively expanding potential, which triggers enactment of the afferent nerve fiber to which they are associated.
7 0
2 years ago
Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which princ
LenKa [72]

Answer:

This is Elijah from FLVS hihi :DDDDDDDDDDDDDDDDDDDDDDDDDDDDD CVS

Explanation:

6 0
2 years ago
Other questions:
  • Which of the following is not a benefit of active listening?
    8·1 answer
  • Which act was used to penalize Sara? Sara was found to be in possession of a controlled substance for which she had no justifica
    5·1 answer
  • ___________ is an approach to boundary spanning that results from using sophisticated software to search through large amounts o
    8·1 answer
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • The icacls.exe command adds __________, which are visible by clicking the Advanced button in the folder Properties dialog box
    15·1 answer
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
    6·1 answer
  • Write a program trapezoid.cpp that prints an upside-down trapezoid of given width and height. However, if the input height is im
    14·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number re
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!