Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. # =======================================
  2. # === The Kitty Mood Improver Project ===
  3. # =======================================
  4.  
  5. # ========================= Day 1#
  6.  
  7. # Task 1
  8. # Ask kitty how is he feeling today.
  9. # If it's "Great!", print out 1 deer kiss!
  10. # If it's "Good", print out 10 deer kisses, so he can feel great!
  11. # If it's "Okay", print out 30 deer kisses, so he can feel great!
  12. # If it's "Bad", print out 100 deer kisses, so he can feel great!
  13. # If it's "Terrible", print out 1000 deer kisses, so he can feel great!
  14.  
  15. # ========================= Day 1#
  16.  
  17. # Task 2
  18. # Copy the code of the previous task.
  19. # Rewrite it by using a function:
  20. # Make a function called "deer_kiss" taking one parameter, "amount".
  21. # That function should print out [amount] deer kisses.
  22.  
  23. # ========================= Day 2#
  24.  
  25. # Task 3
  26. # Copy the code of the previous task.
  27. # Rewrite it by adding another function: "calculate_required_kisses".
  28. # That function should take one parameter, "kitty_feeling".
  29. # It should [return] the necessary amount of deer kisses to make kitty feel great.
  30. # Then, use that function in conjunction with deer_kiss to make kitty's day better.
  31.  
  32. # ========================= Day 2-3#
  33.  
  34. # Task 4
  35. # Copy the code of the previous task.
  36. # Rewrite it by adding yet another function: "query_kitty".
  37. # That function should ask kitty how he feels, and then return what kitty wrote.
  38.  
  39. # ========================= Day 3#
  40. # Task 5
  41. # Copy the code of the previous task. We'll change the logic a bit.
  42. # First, the program should ask kitty how he feels.
  43. # Then, it should use that to decide how many deer kisses to print.
  44. # Then, ask kitty how he feels again.
  45. # Repeat it until kitty replies "Great!"
  46.  
  47. # ========================= Day 3#
  48. # Task 6 - final!
  49. # Copy the code of the previous task.
  50. # There is one thing left to do - if kitty is sleepy and can't type properly, he may mumble his response.
  51. # You may ask him how he feels and get "Mehwh" as reply - is that "great"? is that "okay"? Who knows!
  52. # So if kitty's reply isn't one of the known ones, print out "Kitty, I can't understand you! How are you feeling?"
  53. # until he finally writes a coherent word!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement