Python for Beginners free course - How to make a quiz game part 2
Now that we have created the first question for our Python quiz game let’s insert some comments to the code to make it more readable. As you can see, the code so far is 24 lines of code. As our programs become longer and more complicated it is a good idea to add notes to the code that describe what is going on.
A comment is just a note we enter in our code.
Let’s add our first comment. Each comment must begin with the hash # sign. Anything we type after the # sign is ignored by Python. So, let’s add one comment here, just before the first question.
Hash sign # Question 1 for example. That’s it, if we run the code once more, we can see that the code works as expected, the comment is ignored by the computer but it is useful for the person who is reading the code.
💻 Code of the project: https://replit.com/@CodingWithNick2/Q...
🎮 My Android Game: http://bit.ly/QuizOfKnowledge
Смотрите видео Quiz Game Part 2 - Python for Absolute Beginners Course онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Programming With Nick 26 Апрель 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 334 раз и оно понравилось 15 людям.