Distance______! #Quiz09

--Originally published at It's me

This program was fuuuun, it was simple, we just needed to know/use the pythagorean triangle. The created function consisted in calculating the delta between of two points. E.g. x2-x1 and then applying the formula: c2 = a2 + b2 . Here is my code:

Quiz09..quiz09

Original header image recovered from: https://www.flickr.com/photos/skynoir/14619099578/in/photolist-ogQGZ1-7YPT1Q-4UseZA-93uqTW-5cof6N-7KGmHu-DsRX6R-qwgS3n-8xtj6E-dKuM8o-917TAc-jayNo-9UjB2B-7o4uvb-rnjWcU-a3JoFT-3twFg-RJZAXa-oFjGB9-5WnvwS-a6Agou-6f82D6-oQddZE-6Ugw1H-e4UXR9-25QSpf-CTDyVf-bdnXxc-fDsobv-oXQBxa-bdsPsz-6UT8s-9t1Xyr-ecCAtc-SL6V-4CDcuy-aFvatc-deHg18-dWaa3K-73vGfK-n2n67c-4JEWVy-4mx7Qu-dBkcmV-6xQsAB-fsrCRy-9HiVEg-cQaph5-g9vTHj-eKhz43


AWESOME movie!

--Originally published at It's me

Hidden figures! Maybe you’ve seen it, maybe not, but I totally recommend it. It’s the story of three African-American women, they were part of the group of mathemathicians who served a vital role in NASA during early years of the US space program (IMDb, 2017). It’s really interesting because the story develops in the time when African-American people were discriminated and incluiding that they were female, how could they know something that helped the program. But they really helped as the brains behind one of the greatest operations in US history. It’s even more interesting that the story is based on real facts, their story is real.

The movie is entertaining and you won’t regret it. It’s unbelivable how women had troubles to achieve what they dreamed or how males didn’t think women could be an engineer but I’m glad more women and African-American people (men and women) have more rights for the benefit and development of the world.

Women can be a mathematician/physician/programmer too!

Hidden-Figures-13

Original header image recovered from: https://www.flickr.com/photos/mathampson/8575226905/in/photolist-fQXzyo-e4LhcK-fQXzLJ-57Bkvx-cPKgns-6iC1sS-SacW88-4X5tfy-8tMbXo-79BZRA-5VEJDE-2mr1qQ-RRZLGa-5VEHP5-5mppjA-hLKMU-h919e3-oN3xdH-6ndgdz-4Frrrw-ffkwRW-MAnWL-9fzxvK-2mmQ2M-4oWdgA-93gJcU-6Xgpqk-spFxg1-8fDHFd-bjcEMt-oMroEb-ajcAxG-79BYNQ-bxNNNN-6GmvLD-aj9NQi-dMLeP3-oUvy98-btFbpL-oGtgaE-eZpj4B-aj9NTZ-7Pz6Mf-9aGnUZ-evDkwg-95dL5Z-rRTHnx-aj9L7T-oduLRy-ajczPu/


AWESOME movie!

--Originally published at It's me

Hidden figures! Maybe you’ve seen it, maybe not, but I totally recommend it. It’s the story of three African-American women, they were part of the group of mathemathicians who served a vital role in NASA during early years of the US space program (IMDb, 2017). It’s really interesting because the story develops in the time when African-American people were discriminated and incluiding that they were female, how could they know something that helped the program. But they really helped as the brains behind one of the greatest operations in US history. It’s even more interesting that the story is based on real facts, their story is real.

The movie is entertaining and you won’t regret it. It’s unbelivable how women had troubles to achieve what they dreamed or how males didn’t think women could be an engineer but I’m glad more women and African-American people (men and women) have more rights for the benefit and development of the world.

Women can be a mathematician/physician/programmer too!

Hidden-Figures-13

Original header image recovered from: https://www.flickr.com/photos/mathampson/8575226905/in/photolist-fQXzyo-e4LhcK-fQXzLJ-57Bkvx-cPKgns-6iC1sS-SacW88-4X5tfy-8tMbXo-79BZRA-5VEJDE-2mr1qQ-RRZLGa-5VEHP5-5mppjA-hLKMU-h919e3-oN3xdH-6ndgdz-4Frrrw-ffkwRW-MAnWL-9fzxvK-2mmQ2M-4oWdgA-93gJcU-6Xgpqk-spFxg1-8fDHFd-bjcEMt-oMroEb-ajcAxG-79BYNQ-bxNNNN-6GmvLD-aj9NQi-dMLeP3-oUvy98-btFbpL-oGtgaE-eZpj4B-aj9NTZ-7Pz6Mf-9aGnUZ-evDkwg-95dL5Z-rRTHnx-aj9L7T-oduLRy-ajczPu/


Lists!… #WSQ07

--Originally published at It's me

This program was a little more difficult. We needed to create a program that asks the user for 10 numbers and those numbers have to be stored in a list. With those numbers the program will calculate their total, average and standard deviation. I searched a lot and found information but I really didn’t understand how to do it, so I asked help of a friend of mine that know how to program in C++ and watching my classmates works as example. Here is my code: WSQ07cWSQ07..


Fibonacci everywhere! #Quiz08

--Originally published at It's me

Fibonacci series… They’re quite interesting. Given a number the program will display all the fibonacci serie until the number the user gives, you’ll see the example in the code running. Basically I used the “formula” in this web page and with some help of a friend we could made it. We create the function fibonacci(int i) and the rest was just ifs and for. Here is the code:

quiz8Quiz08

Original header image recovered from: https://www.flickr.com/photos/ghirson/18475777/in/photolist-2CGcT-6GsoZ-oo7TWg-5Pimso-6b7s7N-c6pvt-pktg1Y-dkhaTG-2hdazR-2hhwkW-akkK66-akkK7P-akmSCP-4KyYUJ-6VNZjD-auoSAF-6eYwN-5HEX9f-o8z6-97N2Vr-nMkbeF-9bVtin-4cU5U8-ak7ZDH-akoxRN-dFPAm-akoxUL-5WDT8U-akaXwJ-ugXsf-8W8C2i-3X9rC1-4ikigj-dxvd-2RsTt1-dJ1bG4-akkK1M-QH7UF2-e9syey-jXn1k8-6MhYzd-5FE4R7-oqAfwT-ar66jF-hhA7Fs-7keK9r-8dqu3c-b1ecA-yjdnJ-9X1ET8


Factorial calculator… #WSQ06

--Originally published at It's me

New WSQ! In this activity we had to create a program that given a non-negative integer number, the program displays the factorial number (n!). Also, keep asking the user if they would like to try another number until their anwer is no (n). The first part was a difficult, I researched and found this program, which helped me to do mine, I did it a little different but it helped me a lot. The part of asking a user was easy, I love loops with do while. Here is my code running: WSQ06..WSQ06

Original header image recovered from: https://www.flickr.com/photos/sebadorn/3707431457/in/photolist-6DByd2-biaDRz-4kG6hW-9Ajs9g-BoSK4-7vBn3V-bgfAgD-biaK7a-4rRFMF-dDxUf7-79pk6F-2SWDrK-t63a9-kjthw-73syCt-5x1Ufz-6uxER-cufGLJ-ozqGP9-dRDxgX-CzRu4-82Fz87-5XetFa-9gEPb-9DYpP-82Fz7W-9uYQH-uDun-7b4ZcZ-6DtkQL-9hi6k1-3j7ciB-3j7qrv-3jbLqo-3jbFGS-7ypyhq-4rVKab-3jbJ1Y-3jbw2q-6WNg3f-8TCx8q-8iUqcs-3hoNfA-ksG9f-bay68D-3jbK8j-6pFNS-3jbGUN-UmZfT-SH5TPN


Functions again! #WSQ05

--Originally published at It's me

This WSQ was about creating functions for simple operations: sum, difference, division and product of two numbers.

Basically I didn’t use external sources, I just did it with what I know. We worked with function on previous quizzes, maybe that’s why this wasn’t too difficult. Here is my code running:

WSQ05WSQ05U

Original header image recovered from: https://www.flickr.com/photos/vestman/4908148942/in/photolist-8tHxFC-7MZwaE-9kzL5y-bsgi2A-9cha5C-7MZwAL-pe84vB-bLPD1-4b9YL7-7fmf2R-82DfEm-4b9XnA-rxKfjk-9ca4Th-82ADta-dXUHJP-7eGKnv-pBUjhd-atzkBT-41tGub-efqLKn-qf2WG8-6XFGpN-S3YMcW-6XFGpd-T8QLmk-7MVw9i-mKwcB4-4aA6g5-q6YWiQ-gtr6Cr-7Lwk7b-9NkRv6-9NoCno-qLqYUh-ao8v1g-9u1QYp-qLuahy-r3UVGK-qLyDgF-3jamiU-6jDdeU-SNbqan-r3UXe2-dqQq4h-r3Ztui-9NNBXb-r451NH-mWzMUE-Td3svX


#Quiz 06

--Originally published at It's me

This quiz was about creating 5 programs… But we had to copy the first five exercises from this website and make them work. They were kind of easy, I enjoyed working on it. The only one that I had trouble working on was the second program, basically consisting of converting a char to an int or a float, or viceversa. I found out it was easy with the help of internet and my classmates. Here are my codes and running in a slideshow:

Haga click para ver el pase de diapositivas.

Original header image recovered from:  https://www.flickr.com/photos/lyonora/2553342492/in/photolist-4TCxLq-o1hUE-4nFTB6-62DNq-6boydm-6xixp7-4ocshf-V7e58-2dwCN-4pZ4GJ-6mp8EY-baeZjP-7kuz2S-4WdCTh-7kaEY-xLUqv-6ojgRs-4Pe7z-cvLyLG-95ZcHD-6ojh25-PWi7X-73AM5f-is1M9-HwBe-PyrEu-dPPcN-dM3mJ-bY2MWf-cP3Wi-ehEemC-Jne1Gy-SSnJiF-SSSzB4-nsWjTr-rvwykT-4JTs6B-arbtDz-doDmhe-6kDAjS-naBjky-naBoL9-7xRMxr-6kDCvb-9Qekaz-6kDGpC-8LpE9-mJmYyn-nMRm7i-52u6Xs


Sum of numbers… #WSQ04

--Originally published at It's me

Honestly, this task was a little bit harder than I thought… Everything was great as usual until I had to validate that the numbers were lower and higher and that  the numbers weren’t the same… But I did it! I think the code isn’t to good but it really worked and I’m glad.

Basically for the sum I just needed a loop with do while and for the counter variable instead of writing (cont= cont+1;) I just used the “trick” Ken gave us in class (cont++;). For the validates I used IF and ELSE, the order of this was the difficult part. Finally my code is:

wsq04

And here it is, running with two same numbers, one bigger and one smaller in disorder and in order:

codewsq04

That’s all! Have a nice day.

Original gif at the begginig (because of my confusion) recovered from: http://giphy.com/gifs/gngO1gmBhS9na


Pick a number! #WSQ03

--Originally published at It's me

This assigment was: “Write a program that picks a random integer in the range of 1 to 100. It then prompts the user for a guess of the value, with hints of ’too high’ or ’too low’ from the program. The program continues to run until the user guesses the integer. You could do something extra here including telling there user how many guesses they had to make to get the right answer.”

Made it! In this program I used loops for the program to continue until the user guesses. For the random integer I create an operation supporting by a post on Martin Cruz blog, we add two libraries: #include <stdlib.h> #include <time.h>.

Then we create the operation: variable=inferior limit+rand()%(superior limit +1 -inferior limit) and the number is created randomly. Now we continue with the loop and ifs, to validate when the number is too high or too low. Here’s the code:

codewsq03

And the code running:

wsq03

Regards!