#WSQ02 ‘Hello World’

Now is turn to start writting the basic codes. In this assignment Ken gave us the task to print ‘Hello World’ at the corresponding editor. I tried to see my classmates’ blog to see how they did it, so I can manage to finish the task. However, they only  have screenshots of the final result. This is a screenshot of my failed attemps.
cygwinfail1

Anyways, after a enormous amounts of failures I finally managed to make it run correcty. This was thanks to the assistance of Professor Ken Bauer and a classmate whose name I need to learn for future references. I had to uninstall all of the Pythons I had and Ken helped me out downloading it directly from Cygwin.

winhello

So what I basically learned over here is how to search for one´s Python Version, how to open and run a .py document and that it is easier to have it assigned directly on Desktop. And finally I relearned the basic of print(“”).

helloworldnotepaad

WSQ02 “Hello World!”

Well, at the beginning I had no idea of what I was doing. But… when frustration was about to swallow my entire brain, this stumped into my face: https://docs.python.org/2/tutorial/inputoutput.html

After a brief read, everything got clear 😉

Captura de pantalla 2016-01-24 a la(s) 18.01.41

I wrote the “code” then, open it on the terminal, assuming that I just needed to write “python” and the path to the file

Captura de pantalla 2016-01-24 a la(s) 18.01.55

And…. guess what?!

Captura de pantalla 2016-01-24 a la(s) 18.02.11

IT WORKED!!!

 

I was so dumbly happy after that. I have to confess that was in this course the first time that I actually open my mac’s terminal in order to really use it :3

(Re)loaded

15305597631_ef6846f709

Photo Credit: <a href=”https://www.flickr.com/photos/62490191@N04/15305597631/”>Stephen Tierney.</a> via <a href=”http://compfight.com”>Compfight</a&gt; <a href=”https://creativecommons.org/licenses/by-nc-sa/2.0/”>cc</a&gt;

—-

#TC1017 #WSQ02

Now that everything’s up and running as expected, I’m ready to tackle this course and actually quite excited about making new programs. As of now, the first problem has been solved: display “Hello World!” on the computer screen.

ProofHello

The picture above shows both the cygwin compiler and the folder in which the .cpp and .exe files for the source code were created:

#include <iostream>
using namespace std;

int main(){
cout << “Hello world!” << endl;
}

Making the program was easy, but it took me some time and a little help from Bauer to figure out how to properly run the program.

The rest of the problems will be uploaded soon.

#WSQ02

 

This was the first time I made a Python program ever. 

In order to know the basics of coding with python i read the textbook that is on the TC101 web page of this course. Specifically the first and second chapter.

http://www.greenteapress.com/thinkpython/thinkpython.pdf

 

think python

 

My main problem with this assignment wasn’t writting the code but instead it was running the program in the terminal. With the help of Mr. Ken I finally learned how to make the cygwin terminal actually open any python program. 

 

hello

world

 

I just needed to tell cygwin the directory of where i saved my code and that was it.  

directory

http://www.greenteapress.com/thinkpython/thinkpython.pdf

http://www.greenteapress.com/thinkpython/thinkpython.pdf