Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help ASAP
#1
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'
Reply


Messages In This Thread
Need help ASAP - by ralfi - Sep-17-2017, 02:28 AM
RE: Need help ASAP - by ichabod801 - Sep-17-2017, 02:42 AM
RE: Need help ASAP - by ralfi - Sep-17-2017, 02:44 AM
RE: Need help ASAP - by ichabod801 - Sep-17-2017, 04:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  kill thread or process asap, even during time.sleep nanok66 4 2,982 Apr-29-2020, 10:13 AM
Last Post: nanok66
  Need help asap lucaaa_s02 1 1,761 Jul-17-2019, 09:15 PM
Last Post: Larz60+
  Having issues getting a loop to work PLESSE HELP ASAP manthus007 1 2,152 Aug-25-2018, 10:44 AM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020