Fortune Teller

A simple program asking the user questions and

using their answers to build up a fortune telling in a list

Introduction

The first line allows us to use the sleep commands to pause our program.

The report=[ ] creates a list to store our fake fortune telling.

from time import sleep

report=[ ]

print("Welcome to Mystic Meg")

sleep(2.0)

print("The Computer that can read your mind")

sleep(2.0)

Getting the users name

The second line creates a variable called name which will store what ever

the user types into the input box.

The last line adds the name into the list called report

print("First I need a few details from you to spark my powers")

name=input("Type in your first name")

report.append(name)

Telling the users fortune

In the first line we ask a simple question and put the users answer into

the variable q1

In the second line we see if the user has put an n inside our variable q1.

If they have then we append you need to avoid cats to our report list.

In the fourth line we see if the user has put an y inside our variable q1

and if they have we append we see a furry friend in your life to our report list.

q1=input("Type y if you like cats n if you don't")

if q1=="n":

report.append("you need to avoid cats.")

elif q1=="y":

report.append("we see a furry friend in your life.")

else:

report.append("struggle to make simple choices easily.")

Telling the fortune

This line prints the report list item by item.

0 is the users name 1 is the line from the if elif else choice

print(report[0],report[1])

See if you can create more questions and append more lines onto the users fortune.

You will need to adjust the print statement that tells the fortune

Finally test and DEBUG