Code Camp – Day 4

On the fourth day of our code camp, our focus will be on deepening your programming skills. You’ll have the opportunity to create your own functions, a fundamental skill in coding that enhances code organization and reusability. Additionally, you’ll master the art of conditional expressions, which are at the core of programming logic. These expressions will empower you to make your code react intelligently to various conditions, enhancing its functionality.

In addition to this, we will delve into the world of conditional operators, such as “==”, “>”, and “&&,” which are your tools for creating sophisticated decision-making in your programs. Lastly, you’ll harness the power of the “mouseIsPressed” system variable, learning how to employ it effectively in your code to respond to user interactions like mouse clicks or button presses. These objectives aim to equip you with practical programming skills, enabling you to build interactive and dynamic code as you progress in your coding journey.

Objectives

  • Be able to create your own functions
  • Understand and be able to use conditional expressions
  • Know what the conditional operators are and be able to use them
  • Be able to use the system variable mouseIsPressed (a boolean system variable)

Assets

Day 4 Slides

  • 0:00 Conditional Expressions
  • 1:11 If Statement
  • 2:36 Comparison Operators
  • 4:53 Else Statement
  • 5:57 Else If Statement
  • 8:50 Global Variables
  • 0:00 Introduction
  • 0:26 mouseIsPressed property
  • 3:09 Nested Conditional
  • 5:18 Conditional Operators && and ||
  • 9:20 Functions