course review, x out of y?

--Originally published at Tomas Enciso

Not too sure where to start. Just like the course its not like you can give a rating like a five star or x out of 10. Personally I think it’s a new and great way to learn, this gives the student total control on the assignments, mainly when to do them and how, that is a good thing and a bad thing, just look at me, it’s 7 am and I’m trying to finish blog posts 3 hours before the final exam that I started several weeks ago and for some reason I kept postponing these assignments, in a weird way this is also very good, this of course is not that laboral world but we get a glimpse of it, outside the teacher won’t be behind us like in school. The responsibility is on us to finish what we have to finish. Maybe I’m not used to this for several reasons (maybe I’ll blog about that someday). I think this course gives a lot of freedom but it’s not like you have to figure everything out, ken is actually there when ever you need him, just look at his booking system or his social media. Overall this course is great for those who get stuff done and for us are not quite there yet it’s also great because now I know what I really need to improve plus this course is still open after it’s over thanks to the many blogposts. I know this post might not make a lot of sense but hey it’s 7:33 am and I’m about to do the final exam. I give this class a x out of y because you know every student makes whatever they want out of it (just in case you didn’t get it).

Mastery topics part 1

--Originally published at Tomas Enciso

-use of comments

-basic types and their use

-basic output (print)

-calling functions

-creating functions

-importing and using modules/libraries

-use of the conditional “if”

-use of “else” with a conditional (and elif for Python

-Nesting of conditional statements

-use of loops with “while”

-use of loops with “for”

-creation and use of lists in Python

-validated user input

-creation and use of ranges in Python


--Originally published at Tomas Enciso

Now this is a function that gets the square root of a number that the user inputs and by using the babylonian method.

Screen Shot 2017-05-04 at 7.04.09 AM

Screen Shot 2017-05-04 at 7.04.40 AM

For the first run I used a number that we all now the root of, 4 and the function returned 2 and for the second run a tried 50.5 and returned that float number.


--Originally published at Tomas Enciso

Probably one of the most frustrating programs that I had to write just because I tried so many different things. This program is a factorial calculator, basically getting a number from a user and returning the factorial.

Screen Shot 2017-05-04 at 6.42.06 AM

Screen Shot 2017-05-04 at 6.42.38 AM

Here I entered 4 and the function returned 24, this function works by multiplying 4 times 3 times 2 times 1, the for loop is controlled by the number the user inputs.


--Originally published at Tomas Enciso

This one almost Identical to a past wsq except for this one functions took care of everything. The program grabs 2 numbers that the user inputs, of course they have to be integers, and each functions either sums, subtracts, multiplies, divides, or shows the remainder of those 2 numbers.

Screen Shot 2017-05-04 at 6.36.17 AM

Screen Shot 2017-05-04 at 6.37.02 AM

In this example I used 5 and 7, in the code you may have noticed that there is a while and a print statement, this just so the user doesn’t enter 0 second because then there would be an error when trying to divide a number with 0.


--Originally published at Tomas Enciso

This program asks the user for two numbers, those numbers act as a range, this function grabs the two numbers and sums all the numbers between those two numbers including themselves.

Screen Shot 2017-05-04 at 6.25.48 AM.png

Screen Shot 2017-05-04 at 6.26.41 AM

In the first run I used 1 and 2 which the result is 3, and in the second run I used 5 and 10 and the result was 45. for the function I used a counter that kept adding 1 to the number the user inserted and each time that the while loop started again it kept adding to the sum until the lower bound number reached the higher bound.


--Originally published at Tomas Enciso

This program allows the computer to pick a random number between 1 and 100 hundred, the user then has to guess that number and the program will tell if its too high or too low and at the end tell how many times that person guessed.

Screen Shot 2017-05-04 at 6.14.21 AM.pngScreen Shot 2017-05-04 at 6.15.52 AM

there I started with 50 and as the program was telling me I tried to guess the number which in the end was 77 and I guessed 5 times to get it right.

Quiz 4

--Originally published at Tomas Enciso

This quiz was about creating two functions, one was to get 3 numbers and to return the smallest one. The other function has to sum up three squared numbers. The hard part was defining the function so it would do what I wanted it to do. My mistake was having the IF statements bigger or smaller than and not using equals. This of course I realized after Ken broke my program.

For me the sum of the squares was more straight forward. I just made the function have three variables and then summed them up. After that the function just returned the result which was “d”

Here’s the code:

Screen Shot 2017-02-02 at 11.02.29 AM.png

and here’s when the program actually worked:


WSQ 02

--Originally published at Tomas Enciso

This program basically allows the user to enter any temperature in fahrenheit and this person would get how much is that in celsius and if water boils at that temperature.

First I made an input so the user can enter any temperature, after that I gave the program the formula to get celsius put of the number that the user entered which is, Celsius = 5 * (Fahrenheit – 32)/9, then if the final number in celsius was higher or equal to 100 the program would print how much was that in celsius and that water does boil at that temperature, if not then it would print the temperature in celsius and that water does not boil at that temperature.

heres the code:


and here’s the program actually running with both options:

Screen Shot 2017-01-31 at 5.03.00 PM.png

and there it is.