Need help to sort out the below code...

mnishpsyched mnish1984 at gmail.com
Sat Sep 14 02:34:07 EDT 2013


Hello guys,
i am new to programming and trying to solve this small coding: my purpose is to take in values from the user based on a menu provided for selection

the output looks like this...

please select from the following menu:
1. pizza
2. steak
3. pasta
4. burger
type in any number from above for selection..

you have selected: 1. Pizza
The bill amounted for Pizza is $20 along with tax of $0.15 will make upto $20.15 

the code i have written for this is as follows:

print """
Please select from the following menu:
1. pizza
2. steak
3. pasta
4. burger
type in any number from above for selection..
"""

pz = raw_input()
pz = int(pz)

st = raw_input()
st = int(st)

ps = raw_input()
ps = int(ps)

bg = raw_input()
bg = int(bg)

if pz == 1 :
    print "You have selected", pz, ".pizza"
    pr_pz = 20
    tx_pz = 0.15
    tot = pr_pz + tx_pz
    print "The bill amounted for Pizza is $", pr_pz, "along with tax of $", tx_pz, "will make upto $", tot
elif st == 2 :
    print "You have selected", st, ".Steak"
    pr_st = 40
    tx_st = 0.20
    print "The bill amounted for Steak is $", pr_st, "along with tax of $", tx_st, "will make upto $", tot.....................
...........................
but my program doesn't output the selection once i type in any number from the list..Please help me to sort it out...



More information about the Python-list mailing list