Gallery
Solution Debug 3.4. Parse Input
Share
Explore
Solution Debug 3.4. Parse Input

icon picker
The Task

Activity: Debug 3.4 Parse input 🐞

Krispy Kreme Doughnuts 🍩

This program should allow users to enter information about their favourite doughnut. From the website.
Use data from one of the doughnuts on this page to test the program is working.

Start Here

A bug report has been has been submitted on this program. We have looked at the code. It seems to be an error at some of the user inputs, each one of them uses input() We think that the program is not set up to deal with different data types properly. Can you help fix it?
Run the program to identify errors.
Refer to the code clips below to help you fix the errors.
Right click on your code and add a comment explaining what was wrong and how you fixed it.

Expected Output

You could copy and paste the description from the Krispy Kreme website, no need to type it all out!
Doughnut name: Chocolate Sprinkles
Doughnut description: Our signature ring doughnut hand-dipped in chocolatey icing and hand decorated with colourful sugar sprinkles. Boxed and ready for your guests to enjoy.
kcal: 255
Collection (enter true or false): false
Cost: £2.30

Uploading doughnut....


Krispy Kreme Doughnut
--------------------
Doughnut name: Chocolate Sprinkles
Doughnut description: Our signature ring doughnut hand-dipped in chocolatey icing and hand decorated with colourful sugar sprinkles. Boxed and ready for your guests to enjoy.
kcal: 255
Collection: false
Cost: £2.3

Process finished with exit code 0

Good luck! 🍀
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.