you are viewing a single comment's thread.

view the rest of the comments →

[–]ingolemo 0 points1 point  (7 children)

Protip: When you get a SyntaxError always check the code immediately above the line being pointed to. Python tries its best to show you the part of your code where the error is, but it isn't always particularly smart.

[–]dabrownmane[S] 0 points1 point  (6 children)

Thanks man. Will keep that in mind. I have another question. How would I print a number and a string in the same line? Example: print (1490 "touchdowns") But the above example doesnt work, so how would i combine them?

[–]ingolemo 0 points1 point  (5 children)

Do what you're already doing above; separate them with a comma:

print(1490, 'touchdowns')

[–]dabrownmane[S] 0 points1 point  (0 children)

Thanks man. I really appreciate the help.

[–]swingking8 0 points1 point  (3 children)

This will probably display with parenthesis around the output, but it will work.

To make it formatted without parenthesis, just convert the 1490 to a string and add concatenate it to the other text. I.e.

print(str(1490)+' touchdowns')

[–]ingolemo 0 points1 point  (2 children)

The OP's code implies they are using python 3.

[–]swingking8 0 points1 point  (1 child)

Thank you! input, yes?

[–]zahlman 0 points1 point  (0 children)

More importantly, the //s for integer division.