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.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 6E
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning