WSQ13: Exam corrections

#TC1017 #WSQ13

Q1:

For this first question we had to print out a kind of rotated pyramid, which I must say I found somewhat complicated because of the nested ifs. All important notes can be found in the source code:

Captura

 


 

Q2:

The superpower one. We had already done this as a quiz, but I didn´t realize my old code wasn´t really working so it took me a while to realize what I was doing wrong. It turned out I had to multiply the result by the base, and I was doing some weird additions. But now it works perfectely.

Captura.PNG


 

Q3:

The fibonacci series was also already done before, it is quite simple.

Captura.PNG


Q4:

This last problem I could not complete, but here is my source code:

#include <iostream>
#include <string>

using namespace std;

int FindPali(string word){
int i, j;
int size = word.size();

/*This cycle should compare all indices to their opposites to chech for symmetry and decide wheter it is a palindrome or not, however it is not doing anything it seems.*/
for (i=0; i<size; i++){
} cout << word[i];
for (j=size; j>0; j–){
} cout << word[j];
if (word[i] == word[j]){
return 1;
}

}

int main(){
string word;
cout << “Please enter the word:” << endl;
getline (cin, word);

if (FindPali(word)==1){
cout << “Palindrome!” << endl;
} else {
cout << “Not a palindrome.”<< endl;
}

}

GitHub link including all questions: https://github.com/diegodamy/Exam2-Q1

PROJECT WIRLESS COMUNICATION

Hey guys it has been a while since the last time that I published anything but I came back to show you guys some cool thing that I have been building for some time now. It isn’t perfect yet but it is a working prototype. Basically what I’m trying to do is build a security system for cars. In the market they are called immobilizers but they ara kind of expensive so I’m made this much more economic one.

So in the video you will see two circuits, one is the transmitter and the other is the receiver. Each circuit consists of 3 parts. In the transmitter circuit we have: an encoder (HT12E), a PIC 16F628A and a radio frequency transmitter. In the receiving circuit we have: a decoder (HT12D), a PIC 16F628A and a radio frequency receiver.

I made of a pattern of numbers that i choose at the beginning of the program. The two circuits work as a pair and if any of them fail then the whole system fails. The flow of information goes like this: first the PIC from the transmitter sends in a loop information to the encoder (HT12E) and then the encoder encrypts the information to then send it to the radio frequency transmitter. After that the radio frequency receiver intercepts it and sends the data to the decoder (HT12D), this decoder deciphers the information and sends it to the PIC on the receiving circuit. If all the information is correct then the pick activates a relay which finally activates the fan. Remember that the fan is just there for demonstration. It can be replaced with anything that needs 12 volts.Capture1.JPG

Capture2Here is a screenshot of my code. The first image shows the code for the first pic which is on the the transmitter

Continue reading “PROJECT WIRLESS COMUNICATION”

#WSQ14

Scilab is free and open source software for numerical computation providing a powerful computing environment for engineering and scientific applications.

I used this video for start using this program:

Proyecto Final

Mi proyecto consistió en crear una maquina arcade con una Raspberry Pi. Fue un proceso largo más no difícil. Proceso que decidí hacer en dos fases, la fase de diseño y programación y la fase de ensamble y construcción del tablero arcade. En este post pondré todos los links que me proporcionaron información. Si quieren hacer este proyecto y tienen alguna duda no duden en contactarme. No publicare mis diseños de la maquina arcade pero si los necesitan, pídanlos.

Here are the links:

https://github.com/retropie/retropie-setup/wiki/First-Installation

Aqui hay fotos de mi proyecto:

 

Quiz 7

Hola a todos, les traigo un nuevo programa! se trata sobre el quiz 7, este basicamente consite en determinar el producto punto de una lista de numeros, pero ¿qué es el produtcto punto?

El producto punto o producto escalar de dos vectores es un número real que resulta al multiplicar el producto de sus módulos por el coseno del ángulo que forman.

producto

Ejemplo

Hallar el producto punto de dos vectores cuyas coordenadas en una base ortonormal son: (1, 1/2, 3) y (4, −4, 1).

(1, 1/2, 3) · (4, −4, 1) = 1 · 4 + (1/2) · (−4) + 3 · 1 = 4 −2 + 3 = 5

Para la realizacion de este quiz, trabaje junto con mi amigo y Compañero Eduardo Morales.

Captura de pantalla 2016-05-11 a las 22.30.25.png

Como siempre les dejo mi codigo en Github:

https://github.com/OscarBaez/My-codes/tree/master

Referencias de ayuda:

http://www.geoan.com/analitica/vectores/producto_punto.html

Porfavor cualquier duda o comentario, dejarlo en la caja de comentarios  y con gusto respondere.

Course Review

Well, in this course I have learned a lot about programming but I have to be honest and to say that I hope to improve more my skills and habilities in programming in order to solve any type of problems in the dairy life.

This course helped me to know about the bases and the principal thin gs I have to consider when programming, but also let me know more about flipped classes and aboiling grades, which was one of the things I dislike about this course because I didnt pay too much attention to this course in order to attend other subjects and also because grades doesnt count, so as a human being I tenden to pass my other subjects first, but I recomend to take this class with teacher Ken because he is an excellent programming man.