Lab 0


The following is a sample code which is a source code for Lab 0 which was basically show a sample of a source code to what we will be doing further into the class. This source is just a model to show what we will be working on this class which is basically typing codes and running it. Here in the following diagram shows the following code i typed to show what i will be doing for this class. This is a preparation lab that we did in class also at home for some to introduce what this class will really be about and the answer is we will be doing labs using codeacademy to find the solutions for our labs and also other various labs that we will also be using to complete our labs. Below ill just show you a sample lab that was on the EMT site that was shown by our professor and with this sample we had to make of course a sample lab not much work was put in. It was again just a sample lab.



This is the code, well the sample code for the first lab which is Lab 0. this is a sample that was used to show the illustration for the first lab we had to do for EMT 1111 labs. This source code we really didnt know how to actually dictate or understand what it was doing because we have just started this EMT class as of now but we do know that the title has to do with introducing a variable which is this is a string and it is assigned to “title”. Next in the next following lines we just see code like index, the result while indec amd letter, then result and again index but then we print the result and from there we could find a solution. Next it says backwards and also says index again = -1 then you see its length and again while index so this code can have something similar because some codes do get repeated and some just get introduced. Then we letter (x) after it says print of the letter and again we see index, finally it says print(backward) and a whole random code goes after. Again this is just a sample lab i dont know 3/4 of this but i can tell what these codes mean as i mentioned it above. And that concludes the result of the lab 0.

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):
 while index >= length:
 letter = x[index]
 print (letter)
 index = index -1
 print (backward(“dg4346534″))


This is the following screenshot for the sample code of Lab 0, and this is using codeacademy.  i used code academy to take a screenshot for the first lab 0 and the following screenshot is the final result of the lab. First how we even got the screenshot? well we went on and we pasted the source code of the sample code to codeacademy then we just press printscreen on the keyboard then we go to “Paint” then we click paste on the edit option but newer versions you can just click paste no need to search. Right after we save this “screenshot” to save as but we have to put in “png” format because that is only acceptable when we write labs. After that we edit our page, click add media, import the png screenshot then we insert it to the page or lab then we click update in the right corner and thats how i figured out how i got my screenshot.

screenshot lab 0


Leave a Reply

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