#WSQ05-Temperature

Hey guys since I have already told you I am catching up!!…

What I had to do for this #WSQ05 well is simple… I made a program that will prompt the user for a temperature in Fahrenheit and then convert it to Celsius. You may recall that the formula is C = 5 ∗ (F − 32)/9.

Modify the program to state whether or not water would boil at the temperature given.

This is what i did…//Code starts from next line

//CODE

#include <iostream>
using namespace std;

int main(int argc, char const *argv[]) {
float fa;
int cel;

std::cout << “This program can determine the temperature from Farenheit to Celcius.” << std::endl;
std::cout << “Please enter the temperature in ºFarenheit.” << std::endl;
std::cin >> fa;
cel=(int)5*(fa-32)/9;
std::cout << “The temperature given in ºCelcius is… “<<cel << std::endl;
if (cel>100) {
std::cout << “The water can boil at this temperature at typical conditions… Be careful!” << std::endl;
}
else{
std::cout << “The water does not boil at this temperature.” << std::endl;
}
return 0;
}

Captura de pantalla 2016-02-17 a las 18.30.35

#WSQ04-Flipped learning

I think that universities should give the flipped learning a chance, since I saw the video about The Differences between a Traditional and a Flipped Classroom, i found that there is a big difference between both of them, flipped classroom is more relax, also you have got more time to ask and share new information from the course that could be really useful to other classmate or oven the teacher, because he/she has to know if the students are really learning or have specific problems individually or as a group.

So just take a chance and try!!!

#AbolishGrades #TEC #IMD #SolvingProblemsAsEngineer #C++ #TC101

#WSQ06

“Pick a Number”

Bienvenidos al programa “Pick a Number” ¿Qué hace? este programa genera un número al azar, gracias a un comando del que vamos a hablar en seguida, después de generar un número el programa le pide al usuario que adivine dicho número, para llegar a este, el programa dice si el número es más grande o más pequeño al que elegiste, cuando tecleas el número correcto el programa te da una notificación y se termina.

El primer desafío al que nos enfrentamos fue generar en número al azar, generarlo es muy fácil, primero hay que usar un comando especifico que se llama random y para importarlo debemos hacerlo de la siguiente manera:

import random

Después para utilizar la función utilizamos:

random.randint(a,b)

Donde a y b es el rango donde la función va a escoger para usar un numero al azar, por ejemlo, si queremos que el programa elija un número al azar del 1 al 100 escribimos:

random.randint(1,100)

Si quieres conocer un poco más sobre generar un número random, puedes ver esta información

Para finalizar el programa simplemente utilice un while para darle una pista sobre si estaba cerca de encontrar el número correcto.

Aquí esta mi código:

import random
contador=0
print(“Pick a Number”)
print(“Bienvenido a mi programa para adivinar un numero”)
print(“Elija un Numero entre el 1 y el 100. “)
numero=int(input())
contador=contador+1
x= random.randint(1, 100)
while (numero != x): #ver while como una caja
     if (numero > x):
print(“Lo siento te pasaste en el numero”)
     if (numero < x):
print(“no no, tu numero es muy pequeno”)
print(“Elija un Numero entre el 1 y el 100. “)
numero=int(input())
contador=contador+1
print(“PERFECTO! EL NUMERO ES “,x,“LO LOGRASTE!!”)
print(“Tuviste un total de”,contador, “Intentos”)
El código también esta disponible en github

PICKANUMBER

 

Sum of numbers WSQ07

Hello my friends, today we are going to do a task that is very similar to the last ones, but a little more difficult, we are going to write a program that ask the user for a range of integer numbers and then prints the sum of the numbers in that range (inclusive).

We can use a formula but thats not the way that we are going to do it, first we have to decelerate variants, and the use “while” and “if”. Here are some grateful videos for your enjoyment.

 

And as always, the link for my code in GitHub and some evidence

Captura de pantalla 2016-02-12 a las 8.42.59 p.m..png

 

 

Pick a number WSQ06

Hi again!! honestly this task was a little difficult, I had to do some research for this WSQ, and i found some great videos that I leave here. The WSQ consist in creating a program  that ask the user a random number between 1 and 100, the user have to guess and the program won’t stop running until you get the right number, but the machine give you hints and the number of attempts.

 

 

Chis is my link for my code, GitHub.

Captura de pantalla 2016-02-11 a las 10.25.22 p.m.

Temperature WSQ05

Hello!! the task of today was simple, you have to declare variants, also you have to use “if” and “else”, the program will ask you for the temperature in fahrenheit and then the computer will calculate the temperature in celsius with this formula: C = 5 ∗ (F − 32)/9. As an addition of this task, you have to manipulate the code until the computer tell the user if the water boils at the temperature given (under typical conditions), here is an example:

Captura de pantalla 2016-02-10 a las 10.20.39 p.m.

If you don’t know how to use “if” and “else” here are some videos, it might be useful.

 

And finally, this is my code GitHub