Jump to content

Gasper

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Gasper

  1. Hi, Lesson 6 contains a simple game where we define a flowControl() function with the following "if...else" statement: if answer == ("yes" or "y"): displayLesson() else: useTime() print("End program") If we run the module and input "yes" the statement is true but if we input "y" then we get the false/else statement. Only the first parameter is considered apparently, if we swap them ("y" or "yes") then "y" would be considered true and "yes" false. I found that if we remove the round brackets from that line and change the statement to: if answer == "yes" or "y": then both parameters work, "yes" and "y" are then considered as a true statement. Not a big deal, just thought i should mention it.
×
×
  • Create New...