What your Python program should do 1. Ask the user to enter the product name. The user can also enter 'x' (without quotes) to quit. 2. Ask the user to enter the product's category. 3. Ask the user to enter the product's price. The whole program should loop until the user enters 'x' to quit at the product name entry. You do not need to show this original information to the user. Create a function called news ku This function should take the product name and category as parameters. If the category is 'tech', return a string that contains the first three letters of the product name in all caps. If the category is 'office', return a string that contains the last three letters of the product name in all caps. 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 newsku () 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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
Sample output
This is from one continuous run of the program.
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 can 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 product's 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
Transcribed Image Text:Sample output This is from one continuous run of the program. 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 can 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 product's 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
What your Python program should do
1. Ask the user to enter the product name. The user can also enter 'x' (without quotes) to quit.
2. Ask the user to enter the product's category.
3. Ask the user to enter the product's price.
The whole program should loop until the user enters 'x' to quit at the product name entry.
You do not need to show this original information to the user.
Create a function called news ku
This function should take the product name and category as parameters.
If the category is 'tech', return a string that contains the first three letters of the product name in all caps.
If the category is 'office', return a string that contains the last three letters of the product name in all caps.
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 newsku () 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.
Transcribed Image Text:What your Python program should do 1. Ask the user to enter the product name. The user can also enter 'x' (without quotes) to quit. 2. Ask the user to enter the product's category. 3. Ask the user to enter the product's price. The whole program should loop until the user enters 'x' to quit at the product name entry. You do not need to show this original information to the user. Create a function called news ku This function should take the product name and category as parameters. If the category is 'tech', return a string that contains the first three letters of the product name in all caps. If the category is 'office', return a string that contains the last three letters of the product name in all caps. 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 newsku () 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.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education