+ 3
How to print number with strings
you have to print a number with string....like x=45 print(x" this is the number you entered"). . output=45 this is the number you entered. . plz help
5 Antworten
+ 6
Adding onto Koushik Naskar's answer
x=int(input())
print(x, "is the number you entered")
This code first asks for the user's input then prints it with the string.
+ 6
Print(Numer ur enter format(x) Then Result
+ 3
Put a comma in between e.g.
print(45, "this is...")
+ 3
For more complex output purposes I would suggest you to use string formatting
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2455/
+ 2
after the print statement, enter the variable, a comma, and the string in double quotes then you finish by closing them in a brackets. I.e print(y, "this is it")