Lab 0

Code:

title = 'this is a string'
index = 0
result = ''
while index < len(title):
    letter = title[index]
    result = result + letter 
    index = index + 1
print (result)

More Code!!!

def backward(x):
    index=-1
    length=(-1*len(x))
    while index >= length:
        letter = x[index]
        print (letter)
        index = index -1
print (backward("dg4346534"))

Screenshots:

This section contains screenshots showing your program running. First save the image, then upload it, and then insert it into the post. Below you will see an example:

python screenshot

Leave a Reply

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