This is my code:
print(f" the int of your number is {int(float(input('type in a number: ')))}")
Is there a way to assign a variable based on {int(float(input('type in a number: ')))}
so that I can re-use it?
This is my code:
print(f" the int of your number is {int(float(input('type in a number: ')))}")
Is there a way to assign a variable based on {int(float(input('type in a number: ')))}
so that I can re-use it?
You'll have to do it in two steps:
float_answer = float(input('type in a number: '))
print(f" the int of your number is {int(float_answer)}")