Exercise 6: While loop

A while loop repeats code until the condition is met. Unlike for loops, the number of iterations in it may be unknown.  A while loop always consists of a condition…

Exercise 7: Functions

To group sets of code you can use functions. Functions are small parts of repeatable code. A function accepts parameters. In the example below we have parameter x and y….