1.14. Additional Challenges#
Code challenge: Python's Awesome!
You have been provided with some code.
Print('Python's awesome!')The code should say Python’s awesome! However, the code has some bugs!
Debug this code!
The output of your program should look like this:
Python's awesome!Solution
Solution is locked
Code challenge: 30% off!
Today is your lucky day! Your favourite store is having a sale where everything is discounted by 30%! However, the discount isn’t applied until checkout.
Write a program that asks the user for the original price and then gives the discounted price to 2 decimal places.
Example 1
Enter the price ($): 10 $7.00Example 2
Enter the price ($): 79.99 $55.99Solution
Solution is locked
Code challenge: Favourite Foods
Write a program that asks for the user’s top 3 favourite foods and then returns the results as per the examples below.
Example 1
What are your 3 favourite foods? chocolate ice cream cake Your top 3 favourite foods are: 1. chocolate 2. ice cream 3. cakeExample 2
What are your 3 favourite foods? pasta eggs mushrooms Your top 3 favourite foods are: 1. pasta 2. eggs 3. mushroomsExample 3
What are your 3 favourite foods? pineapples peaches lemons Your top 3 favourite foods are: 1. pineapples 2. peaches 3. lemonsSolution
Solution is locked