Tag Archives: #70997a

#Mastery14 – Creating your own and using C++ libraries

Creación y uso de librerias en C++ 

Una de las ventajas de C++ es la facilidad de poder crear tus propias librerias, estas se pueden crear para definir variables con un significado mas especifico.

El ultimo caso que use fue el de la libreria:, esta libreria te permite utilizar el nombre de una variable y darle algun uso segun nuestras necesidades.

Por ejemplo:

GREEN “33[32m” 

PURPLE “33[35m”

BLUE “33[34m” 

 

Para aprender mas acerca de la creación de librerias pueden consultar los siguientes enlaces:

Libreria estatica   Libreria dinamica

 

14 1017

Calling Python functions

– Calling Python functions                                                                              @PablO_CVi

To call a function, first you have to create one(You can see how to here) then you give the values or ask the user to input value or values to the function to work, the next step is to create a new variable and asign it the function, now you are up to call the function using a print you can print the valiabre you assigned to the function, it will print the result of the function with the numbers you or the user gived.

Here is the code of my example: https://github.com/PablOCVi/Mastery/blob/master/Mastery11.py

Using elif…

 – Use of “elif” with a conditional                                                                   @PablO_CVi

The keyword elif is short for ‘else if’, and is useful to introduce lots of if in the code.

my code is: https://github.com/PablOCVi/Mastery/blob/master/Mastery17.py