What if you want to ask the player "choose a number between 'x' and 'y'"?

The root question is if it’s possible to put two or more integers in a print function.

example: print ("choose a number between " + max “and” + min);

Obviously it will error, but you kind of need an ‘and’ to make the sentence flow, right? Would it be possible to do something like this rather than just say “…between 1 and 1000”?

Reason behind question
Honestly, I just thought it would be cool, and I’d learn something new (-:

Sorry if I didn’t get your question right, but is that what you are looking for:

example: print ("choose a number between " + max + “ and ” + min);

You just need to wrap every string with +

1 Like

@Maxim_Inozemtsev - That’s exactly what I was looking for! Thanks so much! So I guess the ‘+’ works as a joining. Good to know!

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

Privacy & Terms