Course Home Online Lessons
Related LinksOnline DevelopmentLessonsReferenceeBooks |
Another look at basic operatorsIn this section we'll look more closely at some of the operators we've been using. You should complete CONDITIONALS AND CONTROL FLOW in CodeAcademy before continuing with this page. Watch the video and follow along in the console
Then use the quizlet below to make sure the operators are committed to memory.
Now try this:
As a reminder, here's a version of a function you worked in CodeAcademy that has an if/else statement: def greater_less_equal_5(answer): if answer > 5: return 1 else: return 0 print greater_less_equal_5(4) print greater_less_equal_5(5) print greater_less_equal_5(6) Try some that have strings as input parameters
Quiz |