Question: Python Assignment # 3 try except and casting Part 1: Widgets sell for $17 each Using raw_input , ask the user for the number of
Python Assignment # 3 try except and casting
Part 1:
Widgets sell for $17 each
Using raw_input, ask the user for the number of widgets required
Use try except to verify that the input value is an int
If the value entered is valid,
Calculate the cost of the widgets
If the value entered is NOT valid, close the program # See the example above
Part 2:
Sales tax for widgets is currently 5.75%
Calculate the cost of the widgets, including tax
Print the total cost in sentence form.
Note: You must use raw_input to receive full credit
Step by Step Solution
There are 3 Steps involved in it
Sure here is a stepbystep breakdown of solving the assignment using Python Well address both part 1 and part 2 using the concepts of tryexcept and cas... View full answer
Get step-by-step solutions from verified subject matter experts
