Driver’s License Exam
The local driver s license office has asked you to create an application that grades the written portion of the driver's license exam. The exam has 20 multiple-choice questions. Here are the correct answers:
1. A
2. C
3. A
4. A
5. D
6. B
7. C
8. A
9. C
10. B
11. A
12. D
13. C
14. A
15. D
16. C
17. B
18. B
19. D
20. A
Your
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Starting Out with Python (4th Edition)
Additional Engineering Textbook Solutions
Problem Solving with C++ (9th Edition)
Using MIS (10th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
C Programming Language
- For each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number of days for a resort stay. Then display the price per night and the total price. Nightly rates are $200 for one or two nights; $180 for three or four nights; $160 for five, six, or seven nights; and $145 for eight nights or more.arrow_forwardAccount numbers sometimes contain a check digit that is the result of a mathematical calculation. The inclusion of the digit in an account number helps ascertain whether the number is a valid one. Write an application named CheckDigit that asks a user to enter a four-digit account number and determines whether it is a valid number. The number is valid if the fourth digit is the remainder when the number represented by the first three digits of the four-digit number is divided by 7. For example, 7770 is valid, because 0 is the remainder when 777 is divided by 7. The next problems rely on the generation of a random number. You can create a random number that is at least mi n but less than max using the following statements: Random ranNumberCenerator = new Random(); int randomNumber; randomNumber = ranNumberGenerator .Next(min, max);arrow_forwardFalling Distance When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d =1/2gt2 The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time in seconds that the object has been falling. Create an application that allows the user to enter the amount of time that an object has fallen and then displays the distance that the object fell. The application should have a method named FallingDistance. The FallingDistance method should accept an object’s falling time (in seconds) as an argument. The method should return the distance in meters that the object has fallen during that time interval.arrow_forward
- Kinetic Energy In physics, an object that is in motion is said to have kinetic energy. The following formula can be used to determine a moving object’s kinetic energy: KE =1/2mv2 In the formula KE is the kinetic energy, m is the object’s mass in kilograms, and v is the object’s velocity in meters per second. Create an application that allows the user to enter an object’s mass and velocity and then displays the object’s kinetic energy. The application should have a method named KineticEnergy that accepts an object’s mass (in kilograms) and velocity (in meters per second) as arguments. The method should return the amount of kinetic energy that the object has.arrow_forwardPaint Job Estimator A painting company has determined that for every 115 square feet of wall space, 1 gallon of paint and 8 hours of labor will be required. The company charges $20.00 per hour for labor. Create an application that allows the user to enter the square feet of wall space to be painted and the price of the paint per gallon. The program should display the following data: • The number of gallons of paint required • The hours of labor required • The cost of the paint • The labor charges • The total cost of the paint jobarrow_forwardProperty Tax If you own real estate in a particular county, the property tax that you owe each year is calculated as 64 cents per $100 of the property’s value. For example, if the property’s value is $10,000, then the property tax is calculated as follows: Tax = $10,000 ÷ 100 × 0.64 Create an application that allows the user to enter a property’s value and displays the sales tax on that property.arrow_forward
- Validy options is: Valid / Invalidarrow_forwardplz write it pseudocodearrow_forwardPython programming language You will be creating an application to calculate the maximum amount of contribution a person can make to a Roth IRA based on their age and income. Over 50 years old and your contribution limit goes up from $6000 to $7000 dollars. However, if the person is married and the combined household income is over $206,000 a year, or a single person with income over $139,000, you are not allowed to contribute. Write an application that asks the user their age and their income. Using this information use a nested if statement to calculate the maximum allowable contribution.arrow_forward
- 6. Travel ExpensesCreate an application that calculates and displays the total travel expenses for a business trip. The user must provide the following information:• Number of days on the trip• Amount of airfare, if any• Amount paid for meals, if any• Amount of car rental fees, if any• Number of miles driven, if a private vehicle was used• Amount of parking fees, if any• Amount of taxi charges, if any• Conference or seminar registration fees, if any• Lodging charges, per nightM06_GADD4658_08_SE_C06.indd 425 05/01/19 2:33 PM426 Chapter 6 Procedures and FunctionsThe company reimburses travel expenses according to the following policy:• $37 per day for meals• Parking fees, up to $10.00 per day• Taxi charges up to $20.00 per day• Lodging charges up to $95.00 per day• If a private vehicle is used, $0.27 per mile drivenThe application should calculate and display the following:• Total expenses incurred by the business person• The total allowable expenses for the trip• The excess that must be…arrow_forwardSales Tax and Total Create an application that allows the user to enter the amount of a purchase. The program should then calculate the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax).arrow_forwardGreenLawn a local lawn care company has different pricing policies for its customers. GreenLawn sends out monthly invoices and will give discounts if payments are made within 5 days. The discounting policy is as follow: If the amount of the monthly bill is greater than $300, subtract 4 percent from the invoice; if the amount is between $300 and $100, subtract a 2-percent discount; if the amount is less than $100, do not apply any discount. All bills made via the web automatically receive an extra 3-percent discount. Develop a decision for GreenLawn discounting decisions. Decision Table submission: Include the initial table with all rules, and the most simplified table. Use different colors in the columns to easily show how columns are collapsed/simplified. please do not provideo solution in image format thank you!arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,