Tuesday, April 6, 2021

input function in python

# -*- coding: utf-8 -*- """ Created on Tue Apr 6 22:22:06 2021 @author: Onyx1 #input from the user #syntax:input() a=input() b=input() print(a+b) a=int(input("please enter number") ) #string type b=int(input("please enter number ")) #string type print(a,type(a)) print(b,type(b)) print(a+b) a=input("enter your name") print(a, type(a)) a =float(input("please enter floating values")) print(a,type(a)) a= int(input("enter number")) print(a,type(a)) """ #raw_input------python 2.x version input

No comments:

Post a Comment

python class topic video