# convert float to int
int(2.0) #output :2
string = "3.5"
#integer = int(string) will not work, as that returns an error.
integer = int(float(string)) #This will work, as you first turn "3.5" to 3.5
#then make it the integer 3
#this is a int
the_int = 41
#this is a float
the_float = 3.937266272812163518356278
a = 5
a = float(a) # int to float
floatNum = float(intNum)
def aud_brl(amount, From, to):
ER = 0.42108
if From.strip() == 'aud' and to.strip() == 'brl':
result = amount/ER
elif From.strip() == 'brl' and to.strip() == 'aud':
result = amount*ER
print(result)
def question():
amount = float(input("Amount: "))
From = input("From: ")
to = input("To: ")
if (From == 'aud' or From == 'brl') and (to == 'aud' or to == 'brl'):
aud_brl(amount, From, to)
question()
a_int = 24
#this is a int
a_float = 3.2883
#this is a float. you can see that it has a difference. it has a . :)