Computer Science, asked by arhansiddiqui108, 8 months ago

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 imtiyazallam
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