Search

Carolina's Blog Site

I use this blog to share my experiences in learning how to program, among other things.

Month

November 2016

Course review.

Hello everyone!

So I am done with my first semester at el Tec, now it’s just finals! WOW, I can’t believe it went by so quickly!!!

Anyway, one of my favorite classes this semester was fundamentals of programming TC101 with To Ken Bauer, so here’s a short review of the course:

I remember our first day, when Ken made us stand on our desks and yell ‘it’s okay to fail’ and told us all about his abolish grading policy and his flipped learning classroom style. It was all sooo new to me!!! I think this learning concept is very different from other teachers’ methods. Consequently, it has its pro’s and con’s.

Everyone learns at a different pace, however, most classes make learning homogenous and don’t encourage individuality, so people feel like they’re always ahead or always behind. This style lets you progress at your very own pace and way. It offers flexibility, and it encourages learning for the sake of learning, not for the sake of earning a grade or accomplishing a homework. Another thing I loved is that it discourages grading, which is like the ultimate individuality destroyer, because every person is different, so you cannot compare them, especially not with such a simplistic method. It makes me so mad that schools do this. It’s simple really, you just can’t compare apples and oranges. Period.

However, there’s also disadvantages to this kind of learning. Even though the freedom it gives you to learn/study can help you grow and discover what works for you, it can also let you not work at all. If you have enough discipline, you can make yourself learn, ask for help and learn from others. Ken is always willing to help and so are your classmates. However, if you don’t, you can end up leaving everything till last minute and learn pretty much nothing. You have to push and discipline yourself. This is very challenging, but it’s good practice because out in the real world you are going to face this same challenge.

So it’s really up to you how you take advantage of Ken’s class. You are the only one responsible for your learning progress, no one is going to be after you, constantly telling you what to do. Personally, I learned a lot in this class, about myself and about programming, and I loved that we helped each other learn as a group. However, at times I did feel lost and confused regarding the class material. Like I said, pros and cons. If you’re up for the challenge, I would definitely recommend this class.

Thank you so much to Ken and to all my classmates for this awesome experience. I learned so much from all of you.

 

Don’t forget the tools.

This is a list of all the tools and resources that helped me learn Python3 in Ken’s class. I hope they’re helpful!!!

great for sharing, interacting and communicating:

  • twitter
  • slack
  • github

 

Validating user input

So when you ask the user for input, you need it to give you a valid input, something you can do whatever it is you wanted to do with it. For example, let’s say you ask for the user’s age because you wanna add something to it. Well, the user might write bdjsfkfs, you never know! So you must prepare accordingly.

First of all, be sure to specify when asking the user for input. Do not assume they know what you want from them. Have the program say things like “only integers, or rounded to the nearest whole number or in military time please.”

pink sweet minions despicable me agnes
source

Now, when asking for input, it will always be given as a string, and you won’t be able to do math operations with it.

capture

One thing you must do is transform the user input into a number by using the int function. That way Python will automatically turn it into an integer and will be able to do math operations with it. Example:

age = int(input("Please enter your age: "))

Another great thing you can use in Python is the try/except statement, like this:

def valid_user_input(x):
    try:          #what you want it to do
        return int(x) > 2
    except ValueError:     #if an error happens,
        print ("please type an integer")     #do this
        return None

 

Robber’s language

Challenge: write a function translate that will translate a text into “rövarspråket” (Swedish for “robber’s language”). That is, double every consonant and place an occurrence of "o" in between.

Thanks Luis Palomino!

https://github.com/cpvp20/robberslanguage

Blog at WordPress.com.

Up ↑