Answers for "python - input: integer"

0

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()
Posted by: Guest on February-24-2022

Python Answers by Framework

Browse Popular Code Answers by Language