I\'ve read through a number of the python whitespace removal questions and answers but haven\'t been able to find what I\'m looking for. Here is a small program that shows a sp
You need to format the entire line into a single string, then print that string.
print ("\n\n\nOn the math section, you guessed {0}, and your actual score was {1}!".format(math_guess, math_score))
Try this one:
print "\n\n\nOn the math section, you guessed %d and your actual score was %d!" % (math_guess, math_score)
You can read more at Built-in Types
Yes, format your string:
print("... you guessed {}, and ... was {}!".format(math_guess, math_score))
print ("\n\n\nOn the math section, you guessed",math_guess,", and your actual score was",math_score,"!", sep ='')
if this is py3+ i think
print ("\n\n\nOn the math section, you guessed"+str(math_guess)+", and your actual score was"+str(math_score)+"!")
should work if not
or use string formatting as others have suggested...