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
vlabodo [156]
3 years ago
13

. Consider a function that will test whether a person is qualified to finance a luxury car. They are qualified if their annual i

ncome is greater than $100,000 and the sales price is less than $1,000,000. Income and sales price are parameters of the function. The function returns a message to the program stating whether the person is qualified or not. a. Complete this function table Name Purpose Parameters Result finance() b. Write the function: c. Write a Python program that inputs income and sales price from the user. Using a while loop, the program validates the income is greater than zero. The program invokes the finance() function with this print statement: "print (finance (income, salesPrice))" d. Test your while loop by seeing what happens when an invalid income is input and then a valid income. Then run your program once with too low an income to finance but okay sales price, once with an okay income and okay sales price, and once with a
Computers and Technology
1 answer:
Helga [31]3 years ago
7 0

Answer:

def finance(income, salesPrice):

   if income > 100000 and salesPrice < 1000000:

       return "You are qualified."

   else:

       return "Your are not qualified!"

   

   

while True:

   income = int(input("Enter your income: "))

   if income <= 0:

       print("Invalid income!")

       break;

   else:

       salesPrice = int(input("Enter the sales price: "))

       print (finance(income, salesPrice))

Explanation:

Create a function called finance that takes two parameters, income and salesPrice

Check if income is greater than 100000 and salesPrice is greater than 1000000. If they are, return you are qualified. Otherwise, return your are not qualified.

Create a while loop that iterates until the user enters an income that is smaller than or equal to 0. Otherwise, ask the user to enter the sales price and call and print the finance function with given inputs to see the result.

You might be interested in
SOMEONE PLEASE HELP ME WITH THIS ILL GIVE YOU BRAINLY IF YOU GET IT RIGHT PLEASE!!!!!
zepelin [54]

Answer:

Supply and demand affects the labor market just like any other market. ... On the flip side if demand for a job increases while supply stays stable then job stability gets higher and income could get higher as employers are willing to pay more

3 0
3 years ago
Read 2 more answers
The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initi
viva [34]

Answer:

Replace /* Your solution goes here */

with

<em>const int CENTS_PER_POUND = 25; </em>

<em> cout << "Weight(lb): "; </em>

<em>cin >> shipWeightPounds; </em>

<em>shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds; </em>

<em />

Explanation:

This line declares and initializes CENTS_PER_POUND as constant integer to 25

const int CENTS_PER_POUND = 25;

This line prompts user for weight of shipment

cout << "Weight(lb): ";

This line gets weight from the user

cin >> shipWeightPounds;

This line calculates the cost of shipment

shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;

4 0
3 years ago
[1] Our son has started playing organized T-ball, a beginner’s version of baseball. [2] “Organized” is what parents call it, any
k0ka [10]
I think it is 3 no? Maybe I dunno but I am confident
6 0
3 years ago
Read 2 more answers
You can use predesigned, formatted files called _____ to create new worksheets quickly.
Leokris [45]
You can use predesigned, formatted files called -templates- to create new worksheets quickly.
8 0
3 years ago
How many nibbles make one kilobyte​
Kazeer [188]
2000 nibbles I think correct me if I’m wrong
5 0
3 years ago
Read 2 more answers
Other questions:
  • Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
    7·1 answer
  • In this question, you must create a function in C++ using an external editor. When satisfied with your work, you shall attach it
    10·1 answer
  • Which scenario is invalid for execution by unit Tests? A. Executing test scenarios for negative test scenarios.B. Executing meth
    5·1 answer
  • Which custom configuration is most likely to include a raid array?
    14·1 answer
  • How do you respond to an email?
    6·1 answer
  • Natalie is a secretary and must complete a large amount of filing this afternoon. At 1:00 PM, the office receptionist gets sick
    10·1 answer
  • Which type of financial institution typically has membership requirements?
    14·1 answer
  • What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
    6·2 answers
  • What command is most effective at identifying different types of files?
    6·1 answer
  • I need so much help, can anyone please help me?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!