# To prompt the user to input an integer we do the following:
valid = False
while not valid: #loop until the user enters a valid int
try:
x = int(input('Enter an integer: '))
valid = True #if this point is reached, x is a valid int
except ValueError:
print('Please only input digits')
num = int(input("inter your number: "))
print(num)
# Any input taken by python is always taken as a string.
# To convert it to an integer, we have to wrap input() in int(). Example:
num1 = int(input("Enter a number: "))
num2 = int(input("Enter another number: "))
total = num1 + num2
print(f'Sum: {total}')
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()
age = input("How old are you? ")
age = int(age)