- 1

Help with Python

I need help in coding a code that prompts the user input data and output. For the following question: Write a python script to do the following: Prompt the user to enter a product name prompt the user for a price prompt the user for a quantity Insert the data as a new record in the AcmeCo database Ask the user if they would like to continue and repeat if answer is 'Y'

24th Jul 2017, 12:47 AM
Tjinoo
1 Answer
0
while 1: name = str(input("Product name: ")) price = str(input("Price: ")) quantity = str(input ("Quantity: ")) repeat = str (input ("Do you want restart ?(Y/N) ")) if repeat != 'Y' : break I dont know how to save as a new data.. but the rest are there. Ģood luck and good studies.
31st Jul 2017, 3:26 AM
▲TopGun ▲
▲TopGun ▲ - avatar