How to take input values in python ?

Spread the love

In this tutorial, you will learn how to take input values in python ?

We will use input() function to take values, by default all input values are in string, we need to convert to integer or float depends on our requirement.

Input() Program in python:

a= int(input("enter a value"))
b= int(input("enter b value"))

print('Addition is ', a+b)

Output:

enter a value5

enter b value6
Addition is 11

 

 

 

admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *