0
foo = input("enter a number") print("enetered no is:"(foo)). Am getting error how to execute this with an output as.Enterednois
2 Respuestas
+ 3
use the print function like this:
print("Entered number is:", foo)
EDITED:
if both statements are in the same line separate them with a ';'
+ 1
foo=input("Enter a number")
print("Entered No Is: " + foo)
For multiple input and string/integer combos use format..
foo=input("Enter a number")
foo2=input("Enter another number")
print("You entered {} and {}".format(foo,foo2))