EMT 1111

Screen Shot 2015-12-01 at 5.41.24 PM Screen Shot 2015-12-01 at 5.18.41 PMScreen Shot 2015-12-01 at 5.41.36 PMScreen Shot 2015-12-01 at 4.57.00 PM

in this lab we have learned about tuples. tuples are a comma separated sequence of values. we have also learned how to turn the values in a dictionary into tuples by using the .item() function. we have also learned how to filter a function using lambda. lambda creates a function to be called later. to me doing this lab experiment was not as difficult as previous labs but the thing that was difficult was iterating and using the slice indices to find what are the strides.

Screen Shot 2015-11-24 at 10.07.52 PM

 

 

 

 

Screen Shot 2015-11-24 at 10.07.44 PMScreen Shot 2015-11-24 at 10.07.33 PMScreen Shot 2015-11-24 at 10.07.23 PMScreen Shot 2015-11-24 at 10.07.11 PMScreen Shot 2015-11-24 at 10.07.03 PMScreen Shot 2015-11-24 at 10.06.55 PMScreen Shot 2015-11-24 at 10.06.40 PMScreen Shot 2015-11-24 at 10.06.29 PMScreen Shot 2015-11-24 at 10.06.01 PM

in this lab we have learned about dictionaries. dictionaries are a mapping from a set of keys to corresponding values which are any type. this lab was not as hard as the last lab because dictionaries have somethings similar to lists. insteads of [] we use {} to add things to dictionary and we could assign variables to a dictionary and remove as well like lists..

Screen Shot 2015-11-18 at 9.30.25 PMin this lab we learned about lists. lists are a sequence of values that have elements which are the values in a list. a list can be a number or string and it must be in [ ]. in this lab we have learned how to use lists in function. it was hard at first because i did not understand at first what i had to do but eventually i figured it all out.

 

 

i

UntitledUntitled 3Untitled 4Screen Shot 2015-10-27 at 5.37.31 PM

In this lab we learned what are strings and how to use strings. a string is a sequence of characters. you can access these characters using brackets. so for a example that has string and brackets lets say you have a variable call parrot you set  it equal to ‘bird’ an assigned variable. if you want only one character of the variable. you would set it equal to lets say for example letter=parrot[1]. it would print i in bird because b will not print. for another example please look at the lab above.

 

Screen Shot 2015-10-20 at 4.53.19 PM copyScreen Shot 2015-10-20 at 4.53.25 PM copy

In this lab we were learning about “Fruitful Functions.” fruitful functions are functions that have a return value. in this lab we had to prove that fermats theorem was wrong or right that A**n+B**n=c**n. if you have done this lab you would have a return statement such as ” No, it doesn’t work.” or “Fermat was wrong!”. in this lab my answer came out to be ” No, it doesn’t work.” as you can see on the lab above.

 

Screen Shot 2015-10-13 at 7.24.35 PM

In this lab we have learned about conditionals. in this lab we have used the if  and else statement to do nested conditionals and chained conditionals. we also have used logical operators such or and not in statement. we have also used these symbols != not equal to, <= less than equal to == equals. to me this lab was easy but the only thing i made a mistake on was the sentence structure but i have fixed it.

 

Screen Shot 2015-09-29 at 6.50.43 PM

Screen Shot 2015-09-29 at 6.49.33 PM

In this lab we had to create turtle graphics. We had to import  turtle modules and assign each turtle a name. we had to assign a background color and pen color for the tail of the turtle using the codes shown in the lab above. this lab was difficult for me because i did not  know certain codes to import background and pen color. but eventually i was able to do the lab and it gave me these results.

 

 

 

 

Screen Shot 2015-09-25 at 8.34.39 PM

in this lab we had to create different functions. functions are a named sequenced of statements that perform computation. we had to define functions as well. in order to define a function you will have to write def in the program. for example if you want to define hotel_costs with an argument of city. you will have to write hotel_cost(city):. when you write a function you must include parenthesis and colon. if the function does not have a argument you will have to write this hotel_cost():. if you want your function to return to your last function you must write return and then the name of the function. i have made lots of mistakes in this lab because i have made indentation and capitalization errors in the code and did not write the colons for the functions and i kept on getting error but eventually i learned from them and fixed them.


Untitled

The point of this experiment was to learn how to use python and how the system determines syntax errors. another reason for this experiment was to learn how to write certain things in code. for example when you are typing a statement for a reader to understand you will have to use the # at the beginning of the statement. for example # This is a statement. another example is that when you are writing exponents you would not write it like this 10^2 instead you will write it like this 10**2. at first when i started this experiment it was difficult because i made certain mistakes and the screen will display syntax error. but then i realized my mistakes. when the program asks you type Simple=Truth and you put  a lowercase t for truth it will display syntax error because it is wrong. if it asks you to type a formula and you used the wrong sign it will display syntax error. i have made many mistakes in this experiment and learned from them and i had fun typing codes and learning from my mistakes.