Python Personality Quiz
Python Personality Quiz
You will make a personality quiz that will give the user a result based on if they picked mostly
A’s, mostly B’s, or mostly C’s!
After you’ve planned out your quiz (you must have at least three questions and three answers),
dive into the code:
a_count = 0
b_count = 0
c_count = 0
2. Have the program ask a question and get an answer from the user.
3. Based on the user’s answer, have the program increment either a_count, b_count, or
c_count.
if q1_answer.lower() == 'a':
a_count += 1
elif q1_answer.lower() == 'b':
b_count += 1
elif q1_answer.lower() == 'c':
c_count +=1
else:
print("Sorry, I don't understand that response.")
5. Calculate which of a_count, b_count, or c_count is highest, and give the user the results.
Extensions
1. Add more options and results to your quiz. Give an explanation for each result.
2. Use a dictionary to keep track of a, b, and c counts. Then loop through the dictionary to
find the variable with the highest count at the end.
3. Use a function that takes in a parameter of the user’s answer and allows you to reuse
the code in step #3.