Author Archives: Eduardo Merino

WSQ14, calculating e

For this program I changed my float to a String, and in order to print the exact amount of decimal points I used it as a list, and I printend just the values I wanted (learn more):

Code:
https://github.com/EduardoMerino/Sharing-for-Class/blob/master/wsq-14.py

Reference links:
https://docs.python.org/3/tutorial/introduction.html#lists

http://en.wikipedia.org/wiki/E_%28mathematical_constant%29

WSQ14, calculating e

WSQ14, calculating e

For this program I changed my float to a String, and in order to print the exact amount of decimal points I used it as a list, and I printend just the values I wanted (learn more):

Code:
https://github.com/EduardoMerino/Sharing-for-Class/blob/master/wsq-14.py

Reference links:
https://docs.python.org/3/tutorial/introduction.html#lists

http://en.wikipedia.org/wiki/E_%28mathematical_constant%29

WSQ14, calculating e

WSQ14, calculating e

For this program I changed my float to a String, and in order to print the exact amount of decimal points I used it as a list, and I printend just the values I wanted (learn more):

Code:
https://github.com/EduardoMerino/Sharing-for-Class/blob/master/wsq-14.py

Reference links:
https://docs.python.org/3/tutorial/introduction.html#lists

http://en.wikipedia.org/wiki/E_%28mathematical_constant%29

WSQ14, calculating e

#Quiz09

4 solutions
https://github.com/EduardoMerino/Quiz09

#Quiz09

#Quiz09

4 solutions
https://github.com/EduardoMerino/Quiz09

#Quiz09

#Quiz09

4 solutions
https://github.com/EduardoMerino/Quiz09

#Quiz09

#Mastery21 use of recursion

You use recursion in functions for repetitive algorthms. Basically griting a function inside itself for a sort of loop, making your code smaller and cleaner.

this program is grat example, I have 2 functions and they repeat inside each other, I could have made different functions but they would have recursion in that way. 
#Mastery21 use of recursion

#Mastery21 use of recursion
 my WSQ12 is also a great example of recursion.
in this case the program uses de function gcd to determine the greatest comon divisor, and ans is the gratest common divisor itself, in case that the numbers given by the user are not the same (not x==y), the fuction will call itself but with some changes:

else:
if(x>y):
ans=gcd((xy),y)
else:
ans=gcd(x,(yx))
return ans

other examples of recución are: palindromesstandard deviation

#Mastery21 use of recursion

You use recursion in functions for repetitive algorthms. Basically griting a function inside itself for a sort of loop, making your code smaller and cleaner.

this program is grat example, I have 2 functions and they repeat inside each other, I could have made different functions but they would have recursion in that way. 
#Mastery21 use of recursion

#Mastery21 use of recursion
 my WSQ12 is also a great example of recursion.
in this case the program uses de function gcd to determine the greatest comon divisor, and ans is the gratest common divisor itself, in case that the numbers given by the user are not the same (not x==y), the fuction will call itself but with some changes:

else:
if(x>y):
ans=gcd((xy),y)
else:
ans=gcd(x,(yx))
return ans

other examples of recución are: palindromesstandard deviation

#Mastery21 use of recursion

You use recursion in functions for repetitive algorthms. Basically griting a function inside itself for a sort of loop, making your code smaller and cleaner.

this program is grat example, I have 2 functions and they repeat inside each other, I could have made different functions but they would have recursion in that way. 
#Mastery21 use of recursion

#Mastery21 use of recursion
 my WSQ12 is also a great example of recursion.
in this case the program uses de function gcd to determine the greatest comon divisor, and ans is the gratest common divisor itself, in case that the numbers given by the user are not the same (not x==y), the fuction will call itself but with some changes:

else:
if(x>y):
ans=gcd((xy),y)
else:
ans=gcd(x,(yx))
return ans

other examples of recución are: palindromesstandard deviation

#Mastery09 Basic types.

there are 3 basic tipes in python:

NUMERIC TYPES:

your basic numbers used for math, algebra, and to calculate various values.

The most basic are intergers and floating point numbers.

intergers, used with the function int( ). are numbers with no desimal poin.
and floating point float( ). support decimal point.

and ther is also:

TEXT SEQUENCE TYPES:

witch is srtings. “Textual data in Python is handled with str objects, or strings. Strings are immutable sequences of Unicode code points. String literals are written in a variety of ways:”(python.org)

and finally:

SEQUENCE TYPES:

witch is lists, tuples, and ranges. witch are agroup of balues, (it could be a mixture of values for lists and touples). In a group or package used as a single object, with many values inside.