Topics
- Sequences, if statements, switch statements
- Using if statements (homework)
- Multi-Colored Nightlight
What I learned
Doing anything more complicated than printing or scanning means working in a larger structure of conditional statements. I will want to get familiar with this chart from now on because I will have to use this thing a lot in the coming future.
There's also this efficient way to make an if else statement which I can see myself using a lot in the future.
One the first example of drawing a flowchart and turning it into code I was able to try this form out a bit. Instead of if (time > 15) time++; I wrote
Another thing I am eager to get used to is a switch statement. I want to try this on a micro-controller connected with a robot. I want to program in something for the payload section of the rocket, for sure.
Just looking at how the translation looks and it's clear why we would want to use this type of code.
What I did
The first assignment was a series of statements investigating logical operators. I had reasoned them out myself on paper but decided to program them as practice.
- False
- True
- False
- false
I wrote up a quick program and then used that to check each statement by commanding out lines and recompiling each time. I did run into some errors that had to do with where I placed by parenthesis.
For the second part of the assignment, the final answer after that loop is 7500.
Multi-Colored Nightlight

No comments:
Post a Comment