My experience with the class

So far It has been a tough semester, too many things to do and strict teachers, but this class makes me feel I can do things, mamy classes make feel a lot of students inferior and dumb just because they don’t understand at the same rate other students do, this class you can learn inside the classroom and outside of it knowing you will learn because the teacher gives you the outline and you see the topics at your own rate, but you are sure that you will work on them, even if it’s the last day before the exam, but you do them because it’s fun and you care about what your career is about, It’s been so long a good experience for a rookie programmer, I still have thousands of things to learn from Ken and pther teachers, about programming, technology, etc. but I think this was a good start.

Loops with “while”

This means that, while a numbers or a variable has a value, the program will keep following the action that it has to do

This flowchart explains it, it will keep going only “while” its true, it just needs one time to be wrong to stop doing whatever it does.

Use of the conditional “if” and “else”/”elif”

This is an example from the challenge of the week I made with Carolina Vargas in class.

If is a condition, that states IF some parameters are accomplish then do something and is that IF doesn’t happen the you put ELSE, to do something ELSE… and if that ELSE doesn’t happen then you put another ELSE it’s just that now with ELIF because you can’t repeat the word ELSE.

Reading and writing of text files

In Python, you don’t need to import any library to read and write files.The first step is to get a file object.
The way to do this is to use the open function.
A file is usually categorized as either text or binary.

A text file is often structured as a sequence of lines and a line is a sequence of characters.
The line is terminated by a EOL (End Of Line) character. 
The most common line terminator is the, or the newline character. 
The backslash character indicates that the next character will be treated as a newline. 

A binary file is basically any file that is not a text file. Binary files can only be processed by application that know about the file’s structure.

Creating & Using own modules/libraries.

To create and use you own modules you better code this:

import potato <- You can call you module whatever you want

potato.example (‘hello’) <-Then in parenthesis the output you want it to have

To install it in mac you use this command in the shell:

pip3 install <package>

and the you run your program on the shell and thats it.

It should print ‘Hello’

Libraries: Importing and using them

To import a library f.e. math you literally use the command import and followed by the library you want in this case math:

Captura de pantalla 2016-09-07 a las 5.26.37 p.m..png

There a lots of Libraries/Dictionaries, you can even create your own ( it’s a lot of work obviously but sometimes necessary).

You can look up on google all the dictionaries that exist.

The results are these:

Captura de pantalla 2016-09-07 a las 5.27.10 p.m..png