Wednesday, March 27, 2019

Day three Create

1) Today I was able to code more of my code and start making the blueprints of the functions that need to be used and if I have time I could make the code flow more smoothly and also started to work on the appearance how I want the code to look on the terminal screen.

2) For the code written today finishing the menu choices and then put an if/else statement that equals the user input taking. So the function is printing the options the user can choose from and then asking the user for their input which is followed by an if/else statement which is calling other functions. The first function that was done was asking the user what Pokedex number they are looking for between 1-9. From asking the user what number they are looking for they are giving the Pokemon name and that just it. While right now if I wanted to expand my simple Pokedex to include more I could keep going with an if/else statement but it won't look as clean. My plan towards the end would be looking up a list already formed which the code can pull from and then give the user the name of the pokemon that is associated with the number they choice from.

3) There were some errors that I had trouble today when I was working with my if/else statements. When I wanted to have the code work on the terminal size I kept getting errors on the lines where my if/else statements started. When I looked over the code I noticed I was missing the end of finishing the code(:) but also during my menu options I was asking the user to pick one of the functions through numbers but when I tried to run I was able to get the user input but the if/else statement was not working. When I looked over my code the big problem is shown in the color 
if = '1':
     pokenum()
The code looks correct because the if is equaling the 1 if the user choose it but when looking back at my month code which was asking for the user to put in a month the if/else statement looked like this in the color
if == '3'
       print("March is month associated with the number 3")
The major difference is highlighted in the color. With my first code, I am saying assigning the number one in the if statement which does not want I want because it needs to equal the user input. With the second code, there is a double equal sign which is saying that when the user types in the number 3 the code recognize in the if statement that if the user said three then it equals three which is then it would print the month March. When I realized I make this mistake I went back in and put another equal sign which then was able to take the user input and go through the code that equals the user input. 

4) Today I felt its a 1.3 because I am in a place where I am able to call more functions from the menu choice but I was also able to make a blueprint of how the functions being called would be called on and how it should work in theory. 



No comments:

Post a Comment

Day Twelve Create

1) Today was a day of getting everything organized and what truly still needed to work on in my code. I made a google doc labeled Real creat...