News

This algorithm would allow five numbers to be inputted and would work out the total. A count-controlled loop would be used because it is known, in advance, how many times the algorithm needs to loop.
file_lines = [x.rstrip("n") for x in my_file] You could write such a thing as a formal for… loop in Python, much as you would in another language. The point is that Python has a way to ...