Skip to content

A python program that plays a game akin to 20 questions with the user

Notifications You must be signed in to change notification settings

melissamattwig/20_questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

20 Questions game for SI 507 at the University of Michigan

A python program that plays a game akin to 20 questions with the user

Table of contents

General info

This project implements a 20 questions game based on user input. The user will think of a secret object and the program will try to guess the object. If the program guesses incorrectly, it will ask for user input to learn about the secret object. Thus the program will improve as it is played.

The user will have an option to load a tree file from a previously played game. If a file is not loaded, the game will start with a basic tree of questions. Each time the game is played, the user will have the option to save the tree file from that game in order to play again.

Skills gained

  • Use of trees with tuples of tuples
  • Loading in files and saving new files
  • Implementation of user input

Technologies

Project is created with:

  • Visual Studio Code version 1.76.2
  • Python 3.10

Setup

To run this project:

$ cd ../20_questions
$ python3 20_questions.py

About

A python program that plays a game akin to 20 questions with the user

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages