I’ve had a nice relationship with your way of teaching how to code. First I really thought that your book seems to have only ‘easy stuff’. But you know, I’m really a noob and I’m trying to learn hard. So I choosed to keep things as simple as possible, following your book chapter by chapter and thinking about it constantly. And, of course, print" " and print" “and print” ".
I finished the book but I really need to go back and try to grasp some more concepts specially about class and objects. Actually I always do that in order to understand what is going on.
So last sunday I was soo bored and was feeling myself in ‘code mode’. Inspired by Exercise 27, Memorizing Logic I started to draw a little game. So I opened my gedit and put some Python3 stuff there. I’m using a lot of functions, functions inside another functions, and I tried some crazy stuff that I had sure I was doing it wrong. But I was expecting just some fun.
But when the time came, I found myself stuck to a weird problem. I think I understood well the Logic behind it. But my if statements did not work as I expected.
So I started to print things out, checking if the type of things match, trying to receive specifs values, like booleans, ints, checking to see if the inputs was what I really want they to be. I thought there’s must be something wrong my logical thinking and I tried everthing that comes up to my mind.
The problem that I’ve using Python 3 in this game is probably something related to type of things. For example, If I want that a user gives me a boolean value as string, I need to convert it using bool(), and then, bool() is always return True if, for example, bool(x), where x must be True, so if my string is ‘False’, looks like the string itself is something True, and until now for me is like bool() is not working fine.
Then I saved my file and I created a new one. Basically, I thought: Let’s see If I can make my little game run with Python 2.
Surprise! Now a lot of ‘features’ is working just fine.
Now I will try to finish my game using Python 2. After that, I need to figure out what I need to do to make my game work in Python 3
P.S: English is not my first language. Sorry for any mistake.