cchavez972 cchavez972
  • 16-09-2017
  • Computers and Technology
contestada

Write a program that checks for car mileage. if the mileage is greater than 100000, display "clunker!". if not, display "buy it!"

Respuesta :

geerky42
geerky42 geerky42
  • 16-09-2017
Should be easy to write this program. You need to define function that takes number as input and use if else condition to decide what to print.

For example in Python:

def checkCarMileage(mileage):
    if mileage > 100000:
        print("clunker!")
    else:
        print("buy it!")
Answer Link

Otras preguntas

Explain why a mixed number is not in the set of intergers or whole numbers
2h/3-1/4=1/3 solve and show your steps
is a piece of cloth a point, line, or plane?
a couple wants to install a square mirror that has an area of 500 square inches.to the nearest tenth of an inch,what length of wood trim is needed to go aroun
Write equation in function form 2x+2y=8 and 6x-3y=12
What's 45 out of 58 in percentage?
Which best describes Germany’s standard invasion strategy at the beginning of World War II?a. Attack with a combination of speed and overwhelming forceb. Intimi
what are some fun facts on animal and plant cells.
A six−sided die, with sides numbered 1,2, 3,4,5, and 6, is tossed. What is the probability of tossing a number less than three?
what is the solution to 1/3(s-2)=s+4