Python Forum
i've got these very simple homework
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i've got these very simple homework
#2
You already use randint method so a dictionary is one way:

cookies = {1: "For hate is never conquered by hate. Hate is conquered by love .",
    2: "Your worst enemy has a crush on you!",
    3: "You will make many changes before settling down happily.",
    4: "If you have something worth fighting for, then fight for it.",
    5: "In music, one must think with his heart and feel with his brain."}

print(cookies[cookie])
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
i've got these very simple homework - by HakolYahol - Aug-07-2018, 07:43 AM
RE: i've got these very simple homework - by wavic - Aug-07-2018, 08:31 AM
RE: i've got these very simple homework - by woooee - Aug-07-2018, 05:15 PM
RE: i've got these very simple homework - by buran - Aug-07-2018, 05:23 PM
RE: i've got these very simple homework - by buran - Aug-08-2018, 11:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Where can I get loooads of simple homework questions for kids? omar 1 1,054 Nov-09-2022, 02:33 PM
Last Post: Larz60+
  [TkInter]Simple Python Homework zaji_123 4 4,181 Jan-01-2021, 07:09 PM
Last Post: EliesBe
  Please help. Simple homework Asm0deus314 3 3,504 Feb-02-2020, 07:03 PM
Last Post: michael1789
  Homework Help - Simple Grading System Segovia 7 8,014 Jul-24-2018, 10:55 PM
Last Post: Segovia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020