Logic and the flow of Control

by Elliott Hauser

23 May 2017

Q&A

  • Community engagement - Get started now!
  • Open Source contributions - now Extra Credit

TurtleHacks

A place to celebrate your hacking…

Logistics

Moving forward, you’ll review and merge each others’ work in class.

Review, fix, and close issues assigned to you. We’ll have some catch-up time where we can review any outstanding issues.

Gittr chat.

Merging!

With great power comes great responsibility

  • Never merge your own pull request
  • Never commit directly to the gh-pages branch Imgur
  • Never merge broken or failing code

Review & Merge Posts

Volunteer: Merging with Tommy Tester.

  • Reviewing PRs - comment on them directly
  • Merging - Your responsibility to make sure your partner’s post works! Check that it shows up on our site
  • Assigning issues - already merged work with problems

~10 minutes reviewing & merging posts with a partner.

Discussion: Logic and the Flow of Control

Boolean values are very simple but very powerful. There are tons of useful ways to construct expressions that evaluate to True or False in Python, and we use these to change the behavior of our program.

Basic if statements act as ‘gates’ to control whether blocks of code get executed. elif and else statements enhance this control.

Logical Turtles code talks

3-4 student volunteers

  • Story of your approach
  • Your triumphs
  • Your despairs
  • Problem Solving attitudes and strategies

Functions & Refactoring for Next time

Read up on functions and then use the power of custom functions to make your previous code more concise!

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.