-
Recent Posts
Recent Comments
Archives
Categories
Meta
Tag Archives: #333333
Mastery11 and 12
Comments Off on Mastery11 and 12
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #333333, #mastery11, #mastery12, #TC, #TC1014, Mastery
Mastery02
Comments Off on Mastery02
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #333333, #mastery02, #TC, #TC1014, Mastery
Mastery01
Comments Off on Mastery01
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #333333, #mastery01, #TC, #TC1014, Mastery
#TC1017 #BONUS
Aquí dejo el video para el punto extra!!
Creation and use of matrixes in C++ #Mastery26 #TC1017
Creation and use of matrixes in C++ #Mastery26 #TC1017
Usually this is the way people represented
or in this way
Matrices are used to represent complicated or time-consuming mathematical operations. A single matrix can hold an infinite number of calculations, which can then be applied to a number, vector, or another matrix. There are several operations that can be done on matrices, including addition, multiplication and inverse calculation; some of which will be discussed shortly.
Matriz are declaraed in this way
For example if we want to declarate the matriz called matr with a dimension of 15×4 and you can store character data type we write
matr : matriz [15][4] character
Usefull links 🙂
Comments Off on Creation and use of matrixes in C++ #Mastery26 #TC1017
Posted in Blogs, Syndicated, TC1017 Blogs
Tagged #333333, #Mastery26, #TC, #TC1017, Mastery
Mastery14
Creating and using a Python module
A module is a file containing Python definitions and statements. The file name is the module name with the suffix “.py”
Example:
- Create “hello.py” then write the following function:
def helloworld():
print "hello"
import hello
hello.helloworld()
>>>'hello'
Comments Off on Mastery14
Posted in Blogs, Syndicated, TC1014 Blogs
Tagged #000000, #00008b, #222222, #333333, #393318, #800000, #eeeeee, #mastery14, #TC, #TC1014, Mastery
#Mastery28
Reading and writing of files in C++
Primero llamamos a la libreria
Segundo tenemos que escribir en el documento que vamos a leer.
Ademas debemos de incluir una libreria que nos permite leer archivos que esten en la carpeta donde esta nuestro codigo. Esta libreria se llama
Empezamos con nuestra fiuncion principal int main y abrimos nuestro archivo como se muestra en la imagen abajo de nuestro codigo. (El nombre del documento esta entre “”)
Para escribir en el documento debemos de usar
Cerramos el documento y compilamos y corremos para ver que no haya ningun error.
Aqui esta un ejemplo de lo que hicimos anteriormente:
#mastery28
Mastery27:: Validated user input in c++
#Mastery27
Inputs have to be validated before allowing any kind of processing or operations to be performed on it. This is extremely important because , an unhandled wrong input might have the complete ability to crash a system. C++ has some good validation techniques that can be used to validate most kind of inputs. This post discusses some of the techniques and its shortcomings and what could be done to improve the quality of validation.
Now, consider a program has to accept only integer inputs and reject all the others. So, the developer would have declared to store the integer value in say “int a;”. So “a” will store the input value.
When the user input is accepted using the “cin>>a” statement, we can use the inbuilt methods surrounding the “cin” statement to test its status.
#TC1017
Comments Off on Mastery27:: Validated user input in c++
Posted in Blogs, Syndicated, TC1017 Blogs
Mastery26:: Creation and use of matrices
#Mastery26
La sintaxis de una matriz es C++ es la siguiente:
|
int matrix[rows][cols]; |
En este ejemplo int es el tipo de dato, matrix es el nombre del todo el conjunto de datos y debo de especificar el numero de filas (rows) y columnas (cols).
Las matrices también pueden ser de distintos tipos de datos como char, float, double, etc. Las matrices en C++ se almacenan al igual que los vectores en posiciones consecutivas de memoria.
Podriamos imaginarnos que una matriz es como un tablero, pero en realidad el manejo es como su definición lo indica, un vector de vectores, es decir, los vectores están uno detrás del otro juntos.
Para acceder a los elementos de la matriz es utilizando su nombre e indicando los 2 subíndices que van en los corchetes.
Si coloco int matriz[2][3] = 10; estoy asignando al cuarto elemento de la tercera fila el valor 10.
Es importante tener en cuenta que tanto filas como columnas se enumeran a partir de 0.
#TC1017
Comments Off on Mastery26:: Creation and use of matrices
Posted in Blogs, Syndicated, TC1017 Blogs
Tagged #333333, #Mastery26, #TC, #TC1017, Mastery
#Mastery25
Creation and use of strings in C++
Primero llamamos a la libreria
Despues definimos nuestras variables string, int, y char. Un string es un contenedor diseñado para operar con strings de caracteres de un solo byte.
Despues usamos la funcion legnth para tener el numero de digitos en el numero.
Usamos un ciclo for para comparar el digito con todos los digitos en un numero.
Si el digito del numero es igual al numero de digito, el contador incrementa.
Imprimimos el numero de veces que el digito esta en nuestro numero con un simple cout.
Usamos return 0 para terminar el programa, compilamos y corremos para ver que no haya ningun error.
Aquí esta un ejemplo de un programa corriendo utilizando strings:
#mastery25