Lab 0

 Description:

This is lab 0. Listed below is the sample code along with a screenshot of said code. Shown below is the code I wrote to display what I will be doing in class.

 

 

Code:

This is the sample code.

title = 'this is a string'
index = 0
result = ''
while index < len(title):
 letter = title[index]
 result = result + letter 
 index = index + 1
print (result)
def backward(x):
 index=-1
 length=(-1*len(x))
 while index 
 >= length:
 letter = x[index]
print (letter)
 index = index -1
print (backward("dg4346534"))

 

Screenshot:

.This is the sample of the code.

Screenshot lab 0

Leave a Reply

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