-1

I've begun my first scripting class. I'm am currently stuck in the string formatting section.

The instructions for this problem are, "Write a single statement to print: user_word,user_number. Note that there is no space between the comma and user_number." They provide part of the code to start,

user_word = str(input()) user_number = int(input())

I've had trouble getting errors combining strings and integers in single statements and I am a bit lost on where to start on this. This is also my first time on stack overflow.

Randall McGrath
  • 33
  • 1
  • 3
  • 7
  • Take a look at the [output formatting documentation](https://docs.python.org/3/tutorial/inputoutput.html), it should answer your question. – tfw Nov 23 '20 at 21:12

1 Answers1

0

You can do it like this

print(user_word+","+str(user_number))

It should work. This way, you cast you int to string and then you concatenate.

tamahom
  • 162
  • 1
  • 7