python - What is wrong with my print function? -
i in introduction anaconda class , need write program determine how many times dice roll(s) land on amount of faces. however, cannot print answer correctly.
your problem print statement. try print string called end
string, , forth. think want end
end-of-line character.
instead of printing like
print("a string" end "another string" end "a third string")
use
print("a string\n" "another string\n" "a third string")
note "\n"
end-of-line character in python. code uses feature of python can combine string literals placing them next each other. let lets see individual lines more clearly. code failed because tried string variable, namely end
, , did not define variable.
Comments
Post a Comment