Today, I got to learn Python using a website called 'Codecademy'. Overall, it was a great experience to learn Python. If you're wondering, I'll explain the code I've written to give you a better explanation. At the top, there's a variable called 'skill_completed' equaling to Python Syntax. Under that script is another variable called 'exercises_completed' which is currently set to an integer of 13. The same works for the next variable 'points_per_exercise' which is set to 5. 'point_total', is a variable that changes overtime, it is first set to 100. Then, the variable's value is changed to the value of the two variables 'points_per_exercise' and 'exercises_completed' multiplied together. (Which is 65) as well as adding it to the previous 'point_total' value (Making it 165, 100 + 65). I had also put in a comment (Using the # symbol) to further more explain what's happening. Finally, I print (adds the next bit of code to the black screen on the right.) The speech "I got" as well as the 'point_total' value, with "points!", creating the sentence, "I got 165 points!"
No comments:
Post a Comment