Description
**CODIO IS REQUIRED!**
Project 1: Rental Car
Introduction
Your task for this project is to create a very simple rental car cost estimator. The project is broken into three sections:
- Collect customer input
- Calculate the costs from the customer input
- Display the results to the customer
Your final output should look like this:
Rental Code: D
Rental Period: 5
Starting Odometer: 1234
Ending Odometer: 2222
Miles Driven: 988
Amount Due: $324.40
As you work through the project guides, be aware that before you submit the scripts you will need to develop the scripts and add comments to meet the requirements found in the IT-140 Project Guidelines and Rubric.
Overview: For your final project, you will be creating four small scripts. Collectively, the four scripts will demonstrate your ability to engage in the fundamental
scripting and problem-solving approaches that are represented by the course outcomes.
Reminder: This is the first draft. Even if your script is not functioning perfectly, submit your draft and get feedback so that you can improve on it for the final
submission in Module Five.
Prompt: For this script, you will be using variables and branches. A variable is used to remember a value for later use. The statement “age = 15” defines a variable
named age, which Python uses to refer to a new object with the integer value 15. When a statement executes that assigns a value to an existing variable, Python
updates the variable to refer to the newly assigned object. Likewise, reading a variable's value reads the value of the object referred to by the variable. So, in
Python, if you set a variable to a string, the variable is now a type string object.
To write useful programs, we almost always need the ability to check conditions and change the behavior of the program accordingly. Conditional statements give
us this ability. The simplest form is the if statement. A programmer commonly requires more than one if statement in branches, in which case the elif (short for
"else if") keyword or else keyword can be used.
Your task for Final Project Script One is to create a simple rental car billing calculator. This script also emphasizes the importance of using and modifying variables,
and how branches may impact your approach in creating a script.
You will work on this project in the Project One: Rental Car Billing Script Draft module in Codio. Following the directions in that module, you will also be able to
determine the exact placement of the comments you will need to make in the code. In the Codio activity you will work on having your script do the following three
things:
1. Collect customer input
2. Calculate the costs from the customer input
3. Display the results to the customer
Upon completing the activity and annotating the code. Specifically, your submission for the Rental Car Billing script should address the following critical elements:
1. In Your Script (Annotated Text File)
Refer to the directions in the module in Codio for how to export out and comment your completed script.
A. Create examples of three uses of variables in the script in your code. Be sure your examples indicate the each of the following fundamental types:
i. Assigning a numerical value and string to variables
ii. Changing variable values
iii. Modifying variables with data-type-appropriate operators
B. Create examples of the use of branches and in your code. Be sure your code identifies the following fundamental statements: if, elif, and else
statements.
Unformatted Attachment Preview
Purchase answer to see full attachment
Explanation & Answer
rentalCode = input("(B)udget, (D)aily, or (W)eekly rental?\n")if rentalCode == "W": rentalPeriod = int(input("Number of Weeks Rented:\n"))else: rentalPeriod = int(input("Number of Days Rented:\n"))budgetCharge = 40.00dailyCharge = 60.00weeklyCharge = 190...