How we can take integer as input from user? Also, how we can give output to the console?
Explain both with exampl
Answers
Answered by
0
Answer:
In python you can accept data by using the input function and then convert the data to int format
Syntax: variable = int(input(Message))
Example: a = int(input("Enter a number: "))
We can give output to the console by using the print function
Syntax: print(Message)
Example: print("Hello world!")
Similar questions
Computer Science,
3 months ago
Physics,
3 months ago
Math,
8 months ago
Computer Science,
1 year ago
Math,
1 year ago