-
Recent Posts
Recent Comments
Archives
Categories
Meta
Author Archives: Gilberto Rogel García
#QUIZ09 Solutions #TC1014
Comments Off on #QUIZ09 Solutions #TC1014
Posted in Blogs, Syndicated, TC1014 Blogs
#WSQ11 Yo soy 196
The hardest WSQ so far. I needed lots of help from other school partners.
Code: Click here
Gilberto Rogel García a01630171
#WSQ13 Babylonian Method
Code link here
Picture with examples:
I couldnt understand what the babylonian method was until i looked into Eutimio’s wsq13 which had a video that explained how to do so. I also added two prints (the ones that are as commentary) to help understand what the code does better.
Link to the video:Babylonian method
Comments Off on #WSQ13 Babylonian Method
Posted in Blogs, Syndicated, TC1014 Blogs
#WSQ12 Greatest Common Divisor
Comments Off on #WSQ12 Greatest Common Divisor
Posted in Blogs, Syndicated, TC1014 Blogs
#mastery23 Creation and use of lists in Python
Comments Off on #mastery23 Creation and use of lists in Python
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery23, #TC1014
#mastery22 When to use what type of repetition in a program
In program i think it’s better to make iterative solutions, i’ll show you why:
Recursive solution:
The difference is that when using a recursion it takes alot of time to print as you can see in the picture, iterative solution printed the answer when recursive solution is still calculating the fibonacci of 100.
It is also convenient to use recursion because an infinite loop occurs with iteration if the loop test never becomes false.
The difference is that iteration ends terminates when the loop condition falls whereas recursion terminates when a base case is recognized.
Here are some of the differences of both: http:/
Gilberto Rogel García
Comments Off on #mastery22 When to use what type of repetition in a program
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #mastery22, #TC1014
#mastery21 Use of recursion for repetitive algorithms
A recursion is when you make a function and call it inside of itself. The recursion has a condition, this condition is that the recursive function has to have an end (to terminate) in order to be in the program.
A common example of this is the fibonacci sequence:
Gilberto Rogel García
Comments Off on #mastery21 Use of recursion for repetitive algorithms
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #mastery21, #TC1014
#mastery20 Use of loops with “for”
“i” is the variable that is often used in “for” loops (an iterative loop which means you keep doing something over and over again
For each of the numbers or the things in the range make “i” refer to them and each of those loops is going to refer to each one of those numbers or things
What this program does is that it assigns “i” to every element in that range without including the last number (10)
Comments Off on #mastery20 Use of loops with “for”
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery20, #TC1014
#mastery19 Use of loops with “while”
The “while” loop is a loop (duh) that allows us to repeat actions as long as the condition is true or until the condition becomes false.
This code shows a little example of a while loop:
x is equal to cero and what the “while” means is that when x is lower than three, it will print x and it will turn x into an accumulator that adds one every time that the “while” makes a loop unti x becomes equal or greater than three.
Comments Off on #mastery19 Use of loops with “while”
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #Mastery19, #TC1014