Ok my python comes up saying that something (invalid syntax) is wrong with the word print


#1

#Q.5)

plain_flour = 100
large_eggs = 100
ml_milk = 100
if plain_flour < 100 print ("buy more flower")
if large_eggs < 2 print ("buy more eggs")
if ml_milk < 300 print ("buy more milk")


#2
if condition:

Note the colon as part of the syntax.

Did you mean, "Buy more flour"?


#3

I'm only 13 I don't understand that


#4

please note that u need to explain this as simply as you can, if you can correct it then please do and I need it ASAP! I REPEAT ASAP


#5

I must say, you are being very demanding of strangers with busy lives.


#6

All your print statements should have this syntax,

if plain_flour < 100:
    print ("buy more flour")

#7

While this may be good for practice toward Python 3, Python 2.x does not require parentheses.


#8

Yes, but since it has no negative effect towards the codecademy console, I suggested it because outside of codecademy Python 3 is used quite a lot and for me I was puzzled for awhile after finishing the course and using python 3 when the print wouldn't work cause of no parentheses. :slight_smile:


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.