Unable to answer and write a difficult program
The question is -Write a script that repeatedly asks the user to enter a 'customization option' to be added to an order of sunglasses. When the user enters nothing, the script should stop asking for new 'customization options', and display a message listing the customization options and stating how many customization options there are. Here's what a sample run might look like: Add as many customization options to your order of sunglasses as you want. When you're done, enter 'nothing'. What do you want add to the sunglasses now? titanium mechanism Okay. What do you want add to the sunglasses now? ear socks Okay. What do you want add to the sunglasses now? sub-etha sens-o-matic Okay. What do you want add to the sunglasses now? nothing There are 3 customization options added to the sunglasses: ['titanium mechanism', 'ear socks', 'sub-etha sens-o-matic’] the number of customization options for the sunglasses order, and a lists all the customization options added to the sunglasses order. You need to use the function definition The print and input functions cannot be used in this program I am unable to solve the program. It would be extremely helpful if I could get its solution. Thanking You
On 10/27/2017 08:04 AM, Shivangi Dalmia wrote:
The question is -Write a script that repeatedly asks the user to enter a 'customization option' to be added to an order of sunglasses. When the user enters nothing, the script should stop asking for new 'customization options', and display a message listing the customization options and stating how many customization options there are. Here's what a sample run might look like: Add as many customization options to your order of sunglasses as you want. When you're done, enter 'nothing'. What do you want add to the sunglasses now? titanium mechanism Okay. What do you want add to the sunglasses now? ear socks Okay. What do you want add to the sunglasses now? sub-etha sens-o-matic Okay. What do you want add to the sunglasses now? nothing There are 3 customization options added to the sunglasses: ['titanium mechanism', 'ear socks', 'sub-etha sens-o-matic’]
the number of customization options for the sunglasses order, and a lists all the customization options added to the sunglasses order. You need to use the function definition The print and input functions cannot be used in this program I am unable to solve the program. It would be extremely helpful if I could get its solution.
This would be a really good question to take up at the Python tutor mailing list. See: https://mail.python.org/mailman/listinfo/tutor to sign up. The list members will ask you to post some code you have already attempted, so please do that: show what you have tried and how it has failed, rather than just asking "can I get the solution". Since it sounds like a homework problem you will probably get guidance, but not "the solution". Best of luck, and welcome to Python!
participants (2)
-
Mats Wichmann -
Shivangi Dalmia