Conditionals in Code

Today, students learned about one of the important tools that computer programmers use: the conditional statement. This is used to make decisions about what actions a program should take (outputs), depending on what signals (inputs) the computer receives. In a computer program, the conditional statement is similar to decision-making processes that people use every day: “IF it is raining, THEN I will take an umbrella when I go outside; or ELSE (if it isn’t raining) I’ll leave my umbrella at home.” This basic coding format is present in every programming language, and computers all around us (from vending machines to self-driving cars) are using conditional statements every day!

Students can create their own Self-Driving Car Maze at home by following our attached Student Follow-Up activity!

Author

Lauren Koppel

Lauren earned a Bachelor’s degree with a double major of Biology and Psychology from Clark University, and a Master of Education from the Harvard Graduate School of Education. During her undergraduate years, she worked in a evolutionary neurobiology lab that studied the neural development of annelids (marine worms), with a focus on the sox family of genes. Lauren loves learning about how the world works (including everything from biology to chemistry to engineering), and is passionate about sharing that knowledge and enthusiasm with others. In the past, she has interned at the Museum of Science, where she educated learners of all ages through hands-on activities, games, and experiments. Other science education organizations with which Lauren has worked include The People’s Science, EurekaFest, and Eureka! of Girls Inc. of Worcester. Currently she lives in Boston, where devotes her free time to playing Quidditch, reading sci-fi novels, playing her ukulele, and enjoying all the culinary delights the city has to offer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Open 7 days INFO
Our Young Pre classroom is for ages. This age group is working
BELL SCHEDULE