Tag Archives: #4c93cb

WSQ12 – Greatest Common Divisor

Arrays/Vectores

En programación, una matriz o vector (llamado en inglés array) es una zona de almacenamiento continuo, que contiene una serie de elementos del mismo tipo, los elementos de la matriz. Desde el punto de vista lógico una matriz se puede ver como un conjunto de elementos ordenados en fila (o filas y columnas si tuviera dos dimensiones).” Esta es una definicion de lo que serian vectores, aqui esta mi codigo para poder ver un ejemplo de esto….lo unico es que mi programa esta delimitado a solo poder aceptar 90 valores: https://github.com/A01229754/Tc107/blob/master/wsq10.cpp

La informacion donde saque la definicion: http://es.wikipedia.org/wiki/Vector_(inform%C3%A1tica)

Calling Python functions

I made a simple Python program where i call a function i just created in that same Python program.

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.

If you don’t know how to create a Python function, you may want to go and check the post I made about it! Here’s the link: http://jorgepadilla95.withknown.com/2015/creating-python-functions

Creation and use of ranges in Python

– Creation and use of ranges in Python                                                           @PablO_CVi

Loops can be created with while(You can see here how to make loops with while) and for making loops with ranges, the loop has to  be with for, the next steps must be followed, first write for, then the variable this loop is applying like x, after this goes in range, and in parenthesis the number it will stop, and it will start from 0 (8), another option is to separate with a comma the number you want to start and the number you want it to stop, (0,-8), the last way of using the range is first the numer it is going to start, then separated with a comma the number it is going to end, and sepparated from another comma the number of numbers it will count per time. For example: for i in range (1,sz+1):).

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

 

 

 

#Mastery07

Ok to make a comment on a python program you only need to put  a hashtag (#) and then you write the comment you want to and when you finish your comment you only press enter and continue your code.

on this program you will see that I made a comment to put my name and my student ID: https://github.com/Julio1229898/Ken-Work/blob/master/sumasum.py 

Featuring the Work

 – Submit work via Blog RSS and GitHub                                                          @PablO_CVi

This is the use of while.

 

 

 

 

Pick a number

#TC1014 #WSQ06 PICK A NUMBER