Lab Four (Ex. 8.1)

The purpose of this lab was to construct a basic program that prints the individual letters of a string backwards, one line at a time.

Source Code:

planet = 0
while planet < len (“Mars”):
Mars = “Mars” [-1+planet*-1]
print Mars
planet = planet + 1

Python 8.1 image

Leave a Reply

Your email address will not be published. Required fields are marked *