Lab 0

Description: 

In lab 0  we were learning how to create a portfolio and enter python coding.

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"))]]

screenshot

Leave a Reply

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