What your Python program should do Create a new repl for this lab. Do not reuse a repl from a previous lab or class acti
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
What your Python program should do Create a new repl for this lab. Do not reuse a repl from a previous lab or class acti
If the category is anything else, return the original product name in all caps. Do not print anything from inside this function. This function needs to return a value. Create a function called newprice This function should take the product price as a parameter. Increase the price by 10%. Return this new price. Do not print anything from inside this function. This function needs to return a value. Outside of your functions in the main block of code You must call news ku () and pass in the product name and category. Remember to store the return value You must call newprice () and pass in the product price. Remember to store the return value. Display this new information to the user. After you display this information to the user, ask the user again for a product name or 'x' to quit. Keep running your program until the user types in 'x as the product name. Assumptions • You can assume that the length of the original product name will be more than three characters • Your program should keep running until the user types in X as the product name. Price can contain decimals. It's ok if you have the .00000000000001 like in my output. .
Sample output This is from one continuous run of the program. I copied my text from the black area. Please enter a product name. You can also enter x to quit: laptop Please enter the product's category: tech Please enter the product's price: 100 The new SKU is LAP and the new price is 110.00000000000001 Please enter a product name: You Han also enter x to quit: scantron Please enter the product's category: office Please enter the product's price: .75 The new SKU Is RON and the new price is 0.8250000000000001 Please enter a product name. You can also enter x to quit: whiteboard cleaner Please enter the products category: other Please enter the product's price: 8 The new SKU is WHITEBOARD CLEANER and the new price is 8.8 Please enter a product name. You can also enter x to quit: x Say hi to your TA!