Conditional Statements

If statements Quiz

So now that you can see how an if statement works, why don’t we try a quick quiz?

Try and guess the code without running it. What will the above code do? Which will print out the statement?

Hint: % is modulation, it returns 0 if there is no remainder and a 1 if there is.

Answers: + Problem 1 -> Does not print out the statement + Problem 2 -> Does print out the statement