#
print ('Let me help you order a pizza. What size would you like?'
 ' a. small ($7.99)  b. medium ($14.99)  c. large ($18.99)')
choice = input('Please enter a or b or c: ')
prices =  {'a':7.99 , 'b':14.99 , 'c':18.99} 
if choice == 'asdf' :
   print("Ok fam, you became a god, heres the keys and my chick, pizzas still the same tho.")
elif choice == 'a' :
    print("Ok fam, lemme hook you up, a small pizza. There 7.99 each.")

elif choice == 'b':
    print("Ok fam, lemme hook you up, a medum pizza. There 14.99 each.")

elif choice == 'c':
    print("Ok fam, lemme hook you up, a large pizza. There 18.99 each.")

else:
    print("you bum, you had 3 options")

amount = choice * input('How many would you like?')

print ('Your total is  %.2f' % (amount * prices[choice]))

i cannot get this to compile/ work i would like help with the last line, i cannot figure out how to mutiply numbers in strings to get a num value, thanks, ace

On line 20, why are you multiplying choice (a character) by the input? Looks odd doesn't it?

@rproffitt i did not intend to downvote, your help is welcome, appologies

I see upvote +1 so far.

Anyhow, do you see it now?
amount = choice * input('How many would you like?')
might need to be.
amount = input('How many would you like?')

I didn't test this to see if you need to write
amount = int(input('How many would you like?'))

commented: thank you sir, i will make the changes and see if it works. +0

Ace, I think you misunderstand me. I did not test your code. I only pointed out what looks odd or off. If I fix the code, I need your teacher's email address to share that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.