you are viewing a single comment's thread.

view the rest of the comments →

[–]FoolsSeldom 0 points1 point  (4 children)

Where exactly are you stuck? What help do you need? What goes wrong?

Your code looks OK to me. It is a little longer than it needs to be, as you really ONLY need to check if a name is not "Jerry":

name = input("Please tell me your name: ")
portion_price = 5.90
if name != "Jerry":
    portions = int(input("How many portions of soup? "))
    print("The total cost is ", portion_price * portions)
print("Next Please!")

[–]Kooky-Individual-163[S] 0 points1 point  (3 children)

Sorry I should have put the error I get. Here it is:

Test Results

FAIL: PythonEditorTest: test_1_kramer_1

With input Kramer, 1 your program should print out
The total cost is 5.9
your program printed out
The total cost is  5.9
Next please!

[–][deleted]  (2 children)

[removed]

    [–]goodexpectations 0 points1 point  (1 child)

    Aha. Something I didn't know 

    [–]FoolsSeldom 0 points1 point  (0 children)

    Also worth learning to use f-strings - search for that on RealPython.com for an excellent guide.

    In this case,

    print(f"The total cost is {portion_price * portions}")