mercredi 1 mai 2019

i need help! i sort of have a clue on how to this problem but i'd like to hear other users perspectives

In this lab, you will print the user's "fortune".

Create a python program named fortune.py. In the program:

  • create a list (array) called fortuneList containing the following elements:
  • "You will have great luck!"
  • "You will have bad luck"
  • "You will have average luck"

  • select a random integer from 0 to the length of the fortuneList (see previous code samples that chose a random integer)

  • print the fortune from the fortuneList with the subscript matching the randomly-selected integer

Submit the complete fortune.py file.

i've tried doing this on python several tries but i'm stuck. it keeps saying error. if anyone can help me in any way it would be really helpful to me. thanks!




Aucun commentaire:

Enregistrer un commentaire