mercredi 1 avril 2020

I'm trying to create a random chore generator but it doesn't seem to print correctly

I'm trying to create a chore generator that will randomly select a chore, and then randomly select a more detailed chore after that. For example, one of the chores is 'Walk Dog', and then i want the computer to pick a place for me to walk.

import random
import time

print ('Hello!')

choices = ('Play PC', 'Walk Dog', 'Tidy house')
games = ('Siege', 'GTA', 'Minecraft')
places = ('Park up the road', 'Park near gym', 'park near school')

print (random.choice(choices))
if random.choice(choices) == 'Play PC':
  print (random.choice(games))
if random.choice(choices) == 'Walk Dog':
  print (random.choice(places))



Aucun commentaire:

Enregistrer un commentaire