Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_input():
- choice = -1
- while choice < 1 & choice > 4:
- choice = float(input("Your answer: "))
- return choice - 1
- print("This is the Beck Depression Inventory.")
- print("The results of this test are inconclusive,")
- print("but they can be used to assess the need for a diagnosis.")
- print("-----------------------------------------------------------")
- print("Choose the statement that best describes your feelings")
- print("during the last two weeks, including today.")
- print("Choose only one alternative. If several options seem")
- print("to fit equally well, choose the highest number.")
- print("After choosing a number, press 'enter' ")
- print(" ")
- name = input("To start, enter your name: ")
- questions : [
- ## first set
- ("Sadness:", "1. I do not feel sad.", "2. I feel sad much of the time.", "3. I am sad all the time.","4. I am so sad or unhappy that I can't stand it."),
- ## second set
- ("Pessimism:", "1. I am not discouraged about my future.", "2. I feel more discouraged about my future than I used to be.", "3. I do not expect things to work out for me.", "4. I feel my future is hopeless and will only get worse.")
- ]
- count = 0
- for question in questions:
- for option in question:
- print(option)
- print('')
- count = count + get_input()
- print(" ")
- print(" ")
- print("Past failure:")
- print("1. I do not feel like a failure.")
- print("2. I have failed more than I should have.")
- print("3. As I look back, I see a lot of failures.")
- print("4. I feel I am a total failure as a person.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Loss of pleasure:")
- print("1. I get as much pleasure as I ever did from the things I enjoy.")
- print("2. I don't enjoy things as much as I used to.")
- print("3. I get very little pleasure from the things I used to enjoy.")
- print("4. I can't get any pleasure from the things I used to enjoy.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Guilty feelings:")
- print("1. I don't feel particularly guilty.")
- print("2. I feel guilty over many things I have done or should have done.")
- print("3. I feel quite guilty most of the time.")
- print("4. I feel guilty all of the time.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Punishment feelings:")
- print("1. I don't feel I am being punished.")
- print("2. I feel I may be punished.")
- print("3. I expect to be punished.")
- print("4. I feel I am being punished.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Self-dislike:")
- print("1. I feel the same about myself as ever.")
- print("2. I have lost confidence in myself.")
- print("3. I am disappointed in myself.")
- print("4. I dislike myself.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Self-criticalness:")
- print("1. I don't criticize or blame myself more than usual.")
- print("2. I am more critical of myself than I used to be.")
- print("3. I criticize myself for all of my faults.")
- print("4. I blame myself for everything bad that happens.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Suicidal thoughts or wishes:")
- print("1. I don't have any thoughts of killing myself.")
- print("2. I have thoughts of killing myself, but I would not carry them out.")
- print("3. I would like to kill myself.")
- print("4. I would kill myself if I had the chance.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Crying:")
- print("1. I don't cry any more than I used to.")
- print("2. I cry more than I used to.")
- print("3. I cry over every little thing.")
- print("4. I feel like crying, but can't.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Agitation:")
- print("1. I am no more restless or wound up than usual.")
- print("2. I feel more restless or wound up than usual.")
- print("3. I am so restless or agitated that it's hard to stay still.")
- print("4. I am so restless or agitated that I have to keep moving")
- print("or doing something.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Loss of interest:")
- print("1. I have not lost interest in other people or activities.")
- print("2. I am less interested in other people or things than before.")
- print("3. I have lost most of my interest in other people or things.")
- print("4. It's hard to get interested in anything.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Indecisiveness:")
- print("1. I make decisions about as well as ever.")
- print("2. I find it more difficult to make decisions than usual.")
- print("3. I have much greater difficulty in making decisions than I used to.")
- print("4. I have trouble making any decision.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Worhtlessness:")
- print("1. I do not feel I am worthless.")
- print("2. I don't consider myself as worthwhile and useful as I used to.")
- print("3. I feel more worthless compared to other people.")
- print("4. I feel utterly worthless.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Loss of energy:")
- print("1. I have as much energy as ever.")
- print("2. I have less energy than I used to have.")
- print("3. I don't have energy to do very much.")
- print("4. I don't have enough energy to do anything.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Changes in sleeping pattern:")
- print("1. I have not experienced any change in my sleeping pattern.")
- print("2. I sleep somewhat more/less than usual.")
- print("3. I sleep a lot more/less than usual.")
- print("4. I sleep most of the day / I wake up 1-2 hours early and")
- print("can't get back to sleep.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Irritability:")
- print("1. I am no more irritable than usual.")
- print("2. I am more irritable than usual.")
- print("3. I am much more irritable than usual.")
- print("4. I am irritable all the time.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Changes in appetite:")
- print("1. I have not experienced any changes in my appetite.")
- print("2. My appetite is somewhat greater/less than usual.")
- print("3. My appetite is much greater/less than usual.")
- print("4. I have no appetite at all / I crave food all the time.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Concentration difficulty:")
- print("1. I can concentrate as well as ever.")
- print("2. I can't concentrate as well as usual.")
- print("3. It's hard to keep my mind on anything for very long.")
- print("4. I find I can't concentrate on anything.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Tiredness or fatigue:")
- print("1. I am no more tired or fatigued than usual.")
- print("2. I get more tired or fatigued more easily than usual.")
- print("3. I am too tired or fatigued to do a lot of the things I used to do.")
- print("4. I am too tired or fatigued to do most of the things I used to do.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print(" ")
- print("Loss of interest in sex:")
- print("1. I have not noticed any recent change in my interest in sex.")
- print("2. I am less interested in sex than I used to be.")
- print("3. I am much less interested in sex now.")
- print("4. I have lost interest in sex completely.")
- choice1 = float(input("Your answer: "))
- if choice1 == 1:
- count = count
- elif choice1 == 2:
- count = count + 1
- elif choice1 == 3:
- count = count + 2
- elif choice1 == 4:
- count = count + 3
- else:
- choice1 = float(input("Your answer: "))
- print(" ")
- print("--------------")
- print(" ")
- print("Your score:", count)
- if count <= 13:
- print("The results indicate no depression or minimal depression.")
- elif count <= 19:
- print("The results indicate mild depression.")
- elif count <= 28:
- print("The results indicate moderate depression.")
- elif count > 28:
- print("The results indicate severe depression.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement