Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
Rodrigo Tapia’s Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Author Archives: Rodrigo Tapia

#WSQ16

we need to write a program that opens and reads the file 93cars.dat.txt and produces the following data:average gas mileage in city (City MPG)
average gas mileage on highway (Highway MPG)
average midrange price of the vehicles in the set.
http…

#wsq14

In this assignment we will estimate the mathematical constant e. You should create a function called calculuate_e which receives one parameter called precision that should specify the number of decimal points of accuracy.https://github.com/roy…

#mastery18

this Mastery might sound too complicated but in fact it is too easy to regard this mastery is known in Spanish as conditional nested , and no forces have to be an if as it is not the only type of conditional exists, nested conditional m…

#matery09

En este mastery podremos ver todos los tipos de variables que pueden ser usados al programar en c++.

 

Las fundamentales, en c++ existen 6 tipos fundamentales de variables, en cambio en c solo existen 5 ya que c++ se le agrega el tipo de variable bool; los 6 tipos de variables que podemos usar en c++ son los siguientes:

  1. void
  2. char
  3. int
  4. float
  5. double
  6. bool

Void:

void es un tipo especial de variable el cual indica la ausencia de tipo, se usa para indicar el valor de retorno en funciones que no returnan ningun valor y tambien para indicar la ausencia de parametros en funciones que no lo requieren, esta, aun que es una variable opcional en c++, en c por otro lado, es una variable que obligadamente hay que conocer y usar

Char:

Es el tipo alfanumerico, es decir, que puede contener un numero o un signo de puntuación, en lo cual, desde el punto de vista del ordenador todos estos son caracteres. su tamaño de memoria es de 1 byte o un octeto, hay que notar que un char es tratado como un número en lo cual este puede tener un signo positivo o negativo, y este puede tomar el valor desde -128 a 127  y usando el tipo de modificador unsigned encuentra valores desde 0 a 255

Para definir una variable se puede hacer de la siguiente manera

char perro=1;

int:

Existen diferentes tipos de int gracias  a los modificadores, pero al mismo que el int normal sirven para almacenar numeros enteros; desgraciadamente no existen parametros para saber que capacidad tiene cada tipo de int por lo tanto no sabremos cual es el rango que abarcarn, pero aun asi sabemos cual puede ser mas grande que cual, por lo tanto quedaria asi, teniendo el primero como el mas pequeño y el ultimo como el mas grande:

  • short int
  • int
  • long int
  • long long int

float:

Este tipo de variable es una variable la cual arriesga precision por tamaño  haciendola una combinacion de una variable muy util y una impresicion aveces considerable, pero lo que caracteriza a estra variable es que son capaces de guardar numeros con decimales ya que utilizan una base de potencias 10 para poder guardarlas ya que la computadora usa un sistema binario.

double:

Este tipo de varible es una segunda version de la variable anterior (float) ya que esta, igual que la anterior puede guardar numeros con decimales, pero a diferencia de esta, es mucho mas precisa al igual que puede guardar mas datos, todo esto con un mayor consumo de memoria.

Para definir una variable se puede hacer de la siguiente manera

double perro=11234.9835284;

bool:

esta variable, implementada en c++ es usada para evaluar expresiones logicas y solo puede tomar dos valores true o false.

Para definir una variable se puede hacer de la siguiente manera

bool perro=true; 

Final Project

Hi, finally here is our final project which in our opinion it was a little bit complicated because the use and the installation of the magick libray but ones we have that part of the project it become more easy to work on it, as you can see in…

#WSQ13

In this WSQ we need to iwrite a function to calculate the square root of a number using the Babylonian method. You can search for that method, it will be easy to find, here is the link of the code:

https://github.com/royth95/tc1017/blob/master/%23WSQ13

#WSQ12

In these wsq we need to write a function to calculate the greatest common denominator of two positive integers using Euclid’s algorithm, here is the link for the code:

https://github.com/royth95/tc1017/blob/master/%23WSQ12 

#QUIZ11

question 1https://github.com/royth95/tc1017/blob/master/q1.11.cppquestion 2https://github.com/royth95/tc1017/blob/master/q2.11.cpp

Bonus quizz

Here is the image of the teacher’s evaluation

 

Masteries Second Partial

Here are the links of the masteries for these partial and in the description of each one is the number of each masteriehttps://www.youtube.com/watch?v=GXNj32uY8Gohttps://www.youtube.com/watch?v=2ha1nD9C-lIhttps://www.youtube.com/watch?v=_hZ61u…

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).