Python Input and Print method



print( ) method:


Example 1:

print("Hello, World!")


Solution: Hello, World!


Example 2:

print(2456)


Solution: 2456


Example 3:

print("Number is" + 2456)


Solution: Number is 2456



input( ) method:

Example:

print('Enter your name:')
x = input()
print(x)

# If you enter your name for example (Billy):

Output:
Billy

Post a Comment

1 Comments