Use Python to create your own personality quiz

Completed

Have you ever taken a personality quiz, where you answer multiple-choice questions and find out things like... "What type of emoji are you?"

You probably knew, but the ones on the internet are just a series of questions that have scores associated with each answer choice, and then a range of scores for each "personality."

For example, there might be three questions with two answer choices each:

What's your favorite color?

  • red (10 pts)
  • green (4 pts)

What's your favorite food?

  • chips (6 pts)
  • ice cream (5 pts)

So there would be these possible outcomes:

  • red/chips: 16 pts
  • red/ice cream: 15 pts
  • green/chips: 10 pts
  • green/ice cream: 9 pts

And maybe you have three personality possibilities:

  • Under 10 pts: You are personable and clever.
  • 10-14 pts: You are passionate and intense.
  • 15+ pts: You are compassionate and opinionated.

You can see that it really doesn't matter what kind of food the quiz taker chooses if they choose the color red, because that will automatically put them in the "compassionate and opinionated" category.

With Visual Studio Code and the power of Python, you're going to make your own "What is your super sleuth character?" quiz.

Image of a girl wearing a trenchcoat and holding a magnifying glass.

We'll use five questions to determine which of the following four super sleuth characters you're most like:

  • Sharp-Eyed Sam
  • Keen Kai
  • Curious Cam
  • Inquisitive Indy

If you haven't already, set up your local developer environment by following the Set up your Python beginner development environment with Visual Studio Code Learn module.

Learning objectives

In this module, you'll discover how to:

  • Write your first lines of Python code
  • Create a program that allows users to interact with your code
  • Use if, elif, and else statements

Tip

This module is part of a multimodal learning experience. Follow along with a video walkthrough of a similar program in a new tab.

Prerequisites

Note

No coding experience is required to complete these lessons!