0% found this document useful (0 votes)
1K views5 pages

02.06 Module Two Project

Daniel Romanov created a program to calculate the total cost of items on a wish list, including tax and shipping. The program asks the user to input the quantity of four items - FIFA 21, FIFA World Cup cards, a Lego Death Star, and a Barcelona jersey. It calculates the subtotal, tax at 6.5%, and adds a $5.99 shipping fee to get the total cost. The output displays the item name, price, and totals. Daniel identified bugs with the print function and fixed it by overusing str() and float() functions. He plans to get feedback and improve the program by adding more options and products.

Uploaded by

Bob Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views5 pages

02.06 Module Two Project

Daniel Romanov created a program to calculate the total cost of items on a wish list, including tax and shipping. The program asks the user to input the quantity of four items - FIFA 21, FIFA World Cup cards, a Lego Death Star, and a Barcelona jersey. It calculates the subtotal, tax at 6.5%, and adds a $5.99 shipping fee to get the total cost. The output displays the item name, price, and totals. Daniel identified bugs with the print function and fixed it by overusing str() and float() functions. He plans to get feedback and improve the program by adding more options and products.

Uploaded by

Bob Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 5

02.

06 Module Two Project


Name: Daniel Romanov

Directions

Now that you have an understanding of using functions and operations with numerical and non-
numerical data, it's time to show your instructor and yourself what you can do with them! You will use
the software development life cycle (SDLC) to create a working program of your choice that will perform
calculations with user input. Your program can include any Python skills and functions you have learned
up to this point.

This assignment has five steps.

Step One: Planning & Analysis


Read the options carefully and choose ONE as the basis of your project.

Option 1 – Wish List

Have your eye on a new gadget? A new game? Maybe some new clothes? Well, now's your chance to
create a program that calculates the total cost of three items on your wish list, including tax and
shipping.

Follow these steps to begin your planning:

1. Create a wish list by selecting at least three items you want.

2. Do your research. Find the online store(s) where you can purchase your wish list items and
record the price of each one.

3. Think about what user input is required for others to use your program.

4. Think about how you will write an equation to calculate the subtotal of your three items, the tax,
and the total purchase cost with tax and shipping. Note: Use 6.5% tax and a $5.99 flat-rate
shipping fee for your program.

5. The output must include the following: name of each item, item price, subtotal for items, total
amount of tax, shipping fee, and total purchase cost with tax and shipping.

Use this table to organize your data:

Item Price
FIFA 21 Legends Edition $89.99
FIFA 2018 World Cup Collector’s Card Boxes $44.95
Lego Star Wars Death Star $499.95
FC Barcelona Third Jersey $156.45
Step Two: Design
It's time to design your program by writing pseudocode. Your outline must include the following
elements:

• Input statements
• Ask the user for at least three numeric values.
• Show proper use of the int() and float() functions.
• Calculations required to achieve correct output.
• Use proper order of operations.
• Use any appropriate math functions.
• Output statements
• Create clear and well organized output to share the data and results of the calculations.
• Show proper use of the str() function.

Insert your pseudocode here:

from math import *

def main():

ask user to input quantities of each product


all variables

perform mathematical equations

output all necessary details

main()

Step Three: Coding

Use the following guidelines to code your program:

1. To code the program, use the Python IDLE.


2. Using comments, type a heading that includes your name, today's date, and a short description
of the program.
3. Follow the Python style conventions regarding indentation and the use of white space in your
program.
4. Use meaningful names for all variables.
Example of expected output: The output for your program should resemble the following screenshot.
Your specific results will vary, depending on the choices you make and the input provided.

Insert a copy of your code from the IDLE here:

# Module Two Project

#Daniel Romanov

# Purpose: to order some things of wishlist

from math import *

def main():

fifa = input("How many copies of FIFA 21 Legends Edition do you want?")

cardsWC = input("How many FIFA 2018 World Cup Collector’s Card Boxes do you want?")

deathStar = input("How many Lego Star Wars Death Stars do you want?")

jerseyBarcelona = input("How many FC Barcelona Third Jerseys do you want?")


fifaA = (float(fifa) * 89.99)

cardsWCA = (float(cardsWC) * 44.95)

deathStarA = (float(deathStar) * 499.95)

jerseyBarcelonaA = (float(jerseyBarcelona) * 156.95)

subTotal = fifaA + cardsWCA + deathStarA + jerseyBarcelonaA

tax = subTotal * 0.065

shipping = 5.99

total = subTotal + tax + shipping

print("Your Orders")

print(" ")

print("FIFA 21 Legends Edition: $" + str(fifaA))

print("World Cup 2018 Panini Adrenalyn Box Card Set: $" + str(cardsWCA))

print("Lego Star Wars Death Star: $" + str(deathStarA))

print("FC Barcelona Third Jersey Customised $" + str(jerseyBarcelonaA))

print("------------------------------------------------------------------------------------------")

print("Subtotal: $" + str(subTotal))

print("Tax: $" + str(tax))

print("Your Total with $5.99 shipping is: $" + str(total))

print("")

print("Thank you for Shopping!")

main()

Step Four: Testing


Run your code, and evaluate the output. Then, answer the following questions in the testing chart. Use
two to three meaningful sentences to answer each question.
Testing Question Response
The print function was not working properly with
What bugs did you identify in your code? many values

I overused the str() and float() functions to


How did you fix the bugs? overcome this.

Step Five: Maintenance


Passionate programmers strive to improve their code! In two to three meaningful sentences, answer the
following questions in the maintenance chart to consider the next steps of your program.

Maintenance Question Response


I could add the amount of a specific product the
What design and functionality improvements could customer ordered.
you make to your program?

You could send it out for beta testing on the web


How can you get feedback on ways to improve or between friends.
your program?

You could add more options, more products, and


How can you expand your program into a new, overall more fluidity per the customer’s
better program in the future? preferences.

Program crashes
What are potential bugs that users may possibly
encounter if your program is expanded into a new
program in the future?

You might also like