programming-fundamentals
  • Introduction
  • Lesson 1
    • Writing Your First Program
    • Data Types
    • Built In Functions
    • If Statements
    • Using Git and Github
    • Primer
    • Questions
    • Tip Calculator
    • GPA Calculator (optional)
  • Lesson 2
    • Modules
    • Lists
    • Data Structures
    • More On Data Structures
    • Questions
    • Madame Zamad
    • Mad Libs
  • Lesson 3
    • While Loops
    • For Loops
    • Loops and Lists
    • Special Commands
    • Questions
    • TODO List
    • Fibonacci (optional)
  • Lesson 4
    • Functions
    • More Functions
    • Error Handling
    • File I/O
    • Questions
    • Sudoku
Powered by GitBook
On this page
  • Setup
  • Requirements
  • Imports
  • Lists

Was this helpful?

  1. Lesson 2

Madame Zamad

PreviousQuestionsNextMad Libs

Last updated 5 years ago

Was this helpful?

For this assignment you will write a fortune-teller program. Your program will give the user either a fortune or a mystic response to a yes or no question.

Setup

Fork the following repository and clone your copy.

Open madame-zamad.py in your text editor.

Requirements

Imports

  • use the time module's sleep function to simulate thinking about the question

    or divining a fortune.

  • use the random module to randomly select items from lists

Lists

  • create a list of mystic answers to yes or no questions (e.g. "I don't foresee

    positive results")

  • create a list of things to say to the user while they are waiting (e.g.

    "divining...")

  • create a list of fortunes (e.g. "You will soon meet your childhood hero")

Madame Zamad