Introduction to Programming Python and C++

Author Archives: alan46bc

Masteries 24 y 25

Masteries 21 y 23

Mastery 17

Aquí usamos el switch para que si metemos el valor 1 nos de un resultado y si usamos el 2 nos dé otro.

#WSQ17 The last one

This one was really easy I only download it and install it.


#include <iostream> #include <string> #include <fstream> #include <sstream> using namespace std; int main (){ string Read; string mid_price; string city_mpg; string high_mpg; int n = 57; float city; float avg_city = 0.0; float high; float avg_high = 0.0; float price; float avg_price = 0.0; ifstream read_file(“93cars.dat.txt”); if (read_file.is_open()){ for (int i =0; i < 93; […]


I didn’t read this WSQ until now. My schedule is only for today because it’s the last day to upload everything, so I’m gonna end the rest of the wsqs and submit my masteries.  


#include <iostream> #include <cmath> using namespace std; long double precision( int n, long double e) { if (n == 0){ return ceil (e); } else if (n == 1){ return floor ((e * 10 ) + 0.5) / 10; }else if ( n ==2){ return ceil((e * 100 ) + 0.05) / 100; } else […]


#include <iostream> using namespace std; float raiz (float a){ float x = a / 2; for (int i=0; i <20; i++){ x = .5*(x+(a/x)); } return x; } int main (){ float a, r; cout << “Escribe un numero al que quieras sacarle su raiz cuadrada “; cin >> a; float s = raiz (a); […]


This one was really easy.


This one was really hard but I read soe posts of my classmates to understand it.

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).