Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project # 2 This assignment focuses on the design, implementation and testing of a Python program which uses control structures to solve the problem described

Project #2
This assignment focuses on the design, implementation and testing of a Python program which uses control
structures to solve the problem described below.
Important Note about submission
Deliverables
The deliverable for this assignment is the following file:
proj02.py -- your source code solution
Be sure to use the specified file name and to submit it for grading via Codio before the project deadline.
You can just copy and paste your code into the coding window in Codio.
We provide a zip file in the course website that you need to download into your computer, unzip the file,
and open it in PyCharm (similar to the lab) to access the starter code.
Assignment Overview
(learning objectives)
This assignment will give you more experience on the use of:
integers (int)
conditionals
iteration
input/output
Assignment Specifications
With the interstellar excitement of upcoming space travels with NASA and SpaceX, the cosmic teams are
working tirelessly to implement final enhancements and explore innovative concepts! The twist? They've
decided to code these enhancements in Python, not in C#! One fascinating concept on the table is the possibility
of renting spacecrafts, but there's a need for a sophisticated calculator to make it happen! Project 2 is set to
revolutionize how information is computed and displayed for SpaceX that rents spacecrafts to its astronaut
customers. The program will efficiently calculate and showcase the cost of spacecraft rental for a specified
customer.
This assignment is worth 25 points (2.5% of course grade), and must be completed before 11:59 PM
EST on Monday, January 22nd.
After the due date, your score will be deducted by 10% for every 5 hours late or a fraction of it. No
submissions will be accepted after 24 hours from the due date. The penalty will be applied on the
full project score.
The project will be automatically submitted by the due date (01/22). If you want to keep working on it
after the deadline with penalty, you must manually click on Mark as uncompleted, acknowledge the
penalty message and manually click on Mark as completed when done.
1. The program should start by asking the user if they want to continue. The answer is Y for yes or X for
no. You can check the value with Boolean expressions such as
answer ==Y
or
answer !=Y.
2. It will then continue to prompt the user to enter the following four items for a given customer (in the
specified order and use the prompts provided in the strings.txt file or the starter code):
a. The galactic code (a string)
b. Days of your interstellar joyride (an integer)
c. Odometer at liftoff (an integer)
d. Odometer at touchdown (an integer)
It will then process that customer/astronaut information and display the results. At the end, the program should
ask the user if they want to process another request, and it will keep asking until the user enters X.
3. The program will compute the amount of money that the astronaut will be billed, based on the galactic code,
number of days of the joyride, and number of light-years travelled. A light-year is a unit of length used to
express astronomical distances and it is equal to about 6 trillion miles. The amount billed to the astronaut is the
sum of the base charge and the light-year charge. The program will only recognize upper case letters for the
following galactic codes.
Code "XV"(Xylophone Voyager): Embark on a cosmic symphony with the Xylophone Voyager! This
interstellar adventurer not only explores the galaxies but also plays a harmonious tune through the
cosmos. The sound of laughter and xylophone notes will resonate in every star system.
base charge (float): $40.00 for each day
light-year charge (float): charge an additional $0.25 for each light-year driven.
Code 'ET'(Extraterrestrial Explorer): Meet the Extraterrestrial Explorer, your guide to uncharted
celestial wonders! This intrepid traveler goes beyond Earthly boundaries, discovering new realms and
sharing cosmic tales. Brace yourself for an out-of-this-world journey with ET at the helm.
base charge (float): $60.00 for each day
light-year charge (float): it depends on the number of light-years driven:
- no charge if the average number of light-years driven per day is 100 light-years or less;
- otherwise, charge an additional $0.25 for each light-year driven above the 100 light-year per
day limit.
Code 'SI'(Space Invader): Beware the Space Invader! This mischievous intergalactic being has a
knack for infiltrating space lanes with humor and fun. Buckle up as the Space Invader takes you on a
laughter-filled adventure, leaving a trail of cosmic giggles behind.
base charge: $190.00 for each week (or fraction of a week). Note: if you rent for 8 days that is
more than one week so the base rate is for 2 weeks hint: use math.ceil().
light-year charge: it depends on the number of light-years driven:
- no charge if the average number of

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

=+Differentiate between social media roles

Answered: 1 week ago