This is not exactly a research source but it is a website with different problems that can be solved by programming python. It also provides a solution if you cannot figure out the solution. This helped me hone my skills as a beginner programmer to become better at the code.
To keep a computer doing useful work we need repetition, looping back over the same block of code again and again and again. A loop makes the computer repeat a function until a certain condition is met. For instance, the program can continually update the screen until the user clicks a "cancel" button. The loop is the program updating the screen and the condition met is the cancel button. Without these many programs would not function properly.
What if a program requires user input? Then the function "raw_input()" allows for this. By putting a question inside the parenthesis the program can ask the user a question which can then be answered. It is also coupled well with assignment so that the users input can be used later. Ex: food = raw_input("What is your favorite food?") Pizza (User inputted) print "Wow I like", print food, print "too"
Assignments and variables are needed to make python do almost anything. These allow the code to understand anything. For instance, when an input is entered by the user that is needed later, the program will need to recall that later. This function allows the program to call information back whenever it is necessary. Ex: pizza = "I love pizza" print pizza I love pizza
This program has lessons for users of all skill levels. The lesson that most benefited me was the lesson on if statements. These are very important in learning how to code as they allow different events to take place depending on what occurs in the program.