Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - input: integer

birth_year = input("enter birth year: "); //input takes birth_year as STRING
age = 2022- int(birth_year);			  //birth_year is converted in INT

//other built in functions used for converting: int (), float (), bool(), str()
 
PREVIOUS NEXT
Tagged: #python #integer
ADD COMMENT
Topic
Name
6+3 =