Sep-17-2017, 02:28 AM
Need help with this code, why does it have the error???????
gender =(input("What is your gender?"))
f= "female"
m="male"
Age = float(input("What is your age?"))
type= float
History =(input("Does your patient have family history of breast cancer?"))
T= "true"
F= "false"
if int > 40 and f:
print('Consider ordering mammogram')
elif int < 40 and f and T:
print('Consider mammogram because of family history')
else:
print('No mammogram order reccommended')
What is your gender?f
What is your age?41
Does your patient have family history of breast cancer?T
Traceback (most recent call last):
File "<ipython-input-9-412bedcea11e>", line 9, in <module>
if int > 40 and f:
TypeError: '>' not supported between instances of 'type' and 'int'
gender =(input("What is your gender?"))
f= "female"
m="male"
Age = float(input("What is your age?"))
type= float
History =(input("Does your patient have family history of breast cancer?"))
T= "true"
F= "false"
if int > 40 and f:
print('Consider ordering mammogram')
elif int < 40 and f and T:
print('Consider mammogram because of family history')
else:
print('No mammogram order reccommended')
What is your gender?f
What is your age?41
Does your patient have family history of breast cancer?T
Traceback (most recent call last):
File "<ipython-input-9-412bedcea11e>", line 9, in <module>
if int > 40 and f:
TypeError: '>' not supported between instances of 'type' and 'int'