Python Forum

Full Version: [split] Please advise how to write this program
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

Please advise how to write this program.... I’m new to this. TIA?

Stage 1: Data Entry

Write a program which requests that requests a name and sales amount. Store that data in a List. After the user has entered data, request that the user enters 'y' or 'n' to continue. If they enter 'n', print the list of names and sales figures to the screen. If they enter 'y', repeat the first step.

Your program should produce the following result:

Sales Reporting
Name: Gaye Deegan
Sales: 874
Continue? [y/n] y
Name: Ben Martini
Sales: 655
Continue? [y/n] n
--------------------------------
Gaye Deegan 874.0
Ben Martini 655.0
--------------------------------
when you get stuck, post code in python code tags of the specific part your stuck on and any errors received in error tags.
What have you tried? Please post it in code tags, along with the specific problem which is blocking you from finishing it yourself.
I just finished cleaning up the mess of you posting in two other threads. Please do not hijack others' threads - I've issued a warning. Our other comments still apply.
you ask how. the answer to that is to buy a book or find an online tutorial (there are quite many of these). spend the time to learn. try the easy problems and work your way up. then as Yoriz says, if you get stuck ... we are here to help.

if you need this program in your business and don't have time to create it yourself, consider hiring a programmer. many schools are switching to teaching Python. i'm sure there is one near you.