During the week we worked on starting chapter five in Python, going over if, else, and if else statements. The logic behind the labs was simple enough, but one mistake I made was not using the pre-made Python files, and instead created my own new without knowing any better. The big difference was that the pre-made code already had the main function and required you only to fill in missing pieces of code. The problem I had run into in my own program was that I had not been properly assigning the value input into the program to the variable used in the function. That was because I had asked the user to input a number, but had not assigned that value to the variable, like this x = input("Enter a number:"). Hopefully I can remember to use the Python files given so that I don't make things more difficult than they actually are.
-jag13
No comments:
Post a Comment