Question
Your goal of this exercise is to fix the script so that each variable has the correct type. ### Instructions 1. Open the script exercise2.py
Your goal of this exercise is to fix the script so that each variable has the correct type.
### Instructions
1. Open the script exercise2.py present inside the project folder
2. To run the script, open terminal and execute the following command. You will be prompted to enter some values. ``` python3 exercise2.py ```
3. Fix the script so it outputs the correct bill total based on the data being entered.
Code in Python
# The below script will ask for 3 inputs. Each input will be based
# on the price of the items - the price is determined by you. The output
# should print the total of the 3 inputs rounded to 2 decimal places e.g
#
# 1 coffee @ $ 2.00
# 1 sandwich @ $ 4.99
# 1 cake @ $ 2.75
#
# Your total bill is $ 9.74
# Modify the line below
coffee = input('1 coffee @: $ ')
# Modify the line below
sandwich = input('1 sandwich @: $ ')
# Modify the line below
cake = input('1 cake @: $ ')
bill_total = float(coffee) + float(sandwich) + float(cake)
print('Your total bill is $', bill_total)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started