Tag Archives: Mastery

Uso de “switch” como condicional – C++

1017 17

Uso de

Hola!

En este caso hice un video para explicar como podemos usar la función “switch” como un condicional cuando tenemos bastantes opciones por tener.

La estructura contiene como parámetro el valor condicionante con el que vamos a trabajar y dentro de los casos van las instrucciones que queremos que realice en caso de que la condición se de.

Dejaré un video donde trabajo con un ejemplo y una breve explicación para poder entender como usar un switch para condiciones múltiples.

 

Mastery20

Use of loops with “for”

This loop allows you to repeat a code n number of times. 

Example:

Where the a in “for a in range(x)” is a random character, you can put a string if you want.

20 1014

Data analysis with tools (to be determined which tool) #TC1017 #Mastery29

Data analysis with tools (to be determined which tool)  1017 29

The development of a comprehensive computer application should be performed by a number of common steps to all the methodologies. In these steps it is called the life cycle of an application. This cycle consists of six basic steps: analysis, design, coding, implementation, testing and maintenance.

The analysis examines the requirements that must meet the application. The result of the analysis is a specification sheet on which the application requirements appear. This sheet is drawn up by the person responsible for the process of creating the application. If you are creating simple algorithms or programs, the analysis is to assess these three basic steps:

Determining your inputs. That is, the data has to start the program execution. These data provide the result.

Determine the exits. That is, the data obtained as a result algorithm. What the algorithm returns the user.

Determining the process. Studied what the process is to be performed.

If you perform these steps before you start coding regardless of the language you use, you’re going to make quality programs and you will eliminate many errors that can arise if you analyze the program and the requirements they ask the program.

 

http://aprendecpp.com/blog/programacion-en-c-el-analisis.html

#mastery26 Creation and use of strings in Python

Python does not support a character type; these are treated as strings of length one, thos also considered a substring.

To access substrings, use the square brackets for slicing along with the index or indices to obtain your substring.

     Example:

var1= “Hello World”

print (“var1[0]:”, var1[0])

     When the above code is executed, it produces:

var1[0]: H

Gilberto Rogel García

For more info visit:This link

26

1014

#TC1014 #Mastery19 #Mastery20

Cuando usar las diferentes repeticiones

1017  22

Aqui les dejo el link a mi video

En el explico cuando es conveniente usar los diferentes tipos de repeticiones que existen 

esta corto chequenlo!

link:

https://www.youtube.com/watch?v=dr9IjtZKjiM

#TC1014 #Mastery17 #Mastery18

Mastery 27

Here is my Mastery27 video where I talk about the dictionaries in Python.

Video: http://www.youtube.com/watch?v=nBzbAcNySwU

27 1014

Recursion

21 1017

 

Aqui esta una explicacion de como funciona la recursion 

link: https://www.youtube.com/watch?v=jlTP2iU-NiE

#mastery25 Creation and use of ranges in Python

The range() Function

If you do need to iterate over a sequence of numbers, the built-in function range() comes in handy. It generates lists containing arithmetic progressions, e.g.:

 

>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

The given end point is never part of the generated list; range(10) generates a list of 10 values, exactly the legal indices for items of a sequence of length 10. It is possible to let the range start at another number, or to specify a different increment (even negative):

 

>>> range(5, 10)
[5, 6, 7, 8, 9]
>>> range(0, 10, 3)
[0, 3, 6, 9]
>>> range(-10, -100, -30)
[-10, -40, -70]

To iterate over the indices of a sequence, combine range() and len() as follows:

 

>>> a = ['Mary', 'had', 'a', 'little', 'lamb']
>>> for i in range(len(a)):
...     print i, a[i]
... 
0 Mary
1 had
2 a
3 little
4 lamb

My example:

x=[‘mastery25′,’tc1014’]

for i in range (len(x)):

     print (“#”,x[i])

>>>25

>>>1014

25

1014

GILBERTO ROGEL GARCÍA

SOURCE: Here