Do You Know How to Create a Memory Game in Python?

Veröffentlicht am: 04 Juni 2023
auf dem Kanal: CodeFatherTech
589
10

Welcome to this Python beginner tutorial!

In this tutorial, we will build a simple memory game in Python. This video will teach you Python core concepts that you will continue using in your future career as a Python developer.

CHAPTERS
(00:00:01) Explanation of the Memory Game we will build.
(00:00:18) Creating variables to define the length of the sequence of numbers to guess and the maximum value of a number in the sequence.
(00:00:46) Generate the list of 5 random numbers (integers) that the player has to remember. We use the random, time, and os Python modules.
(00:02:07) Implement the code to clear the screen after 5 seconds. This way the player cannot see anymore the initial sequence of numbers to remember.
(00:03:00) Write the Python code that asks the player to provide the correct sequence of numbers
(00:04:57) Use a Python if-else to compare the list of random numbers generated by our program with the list of numbers provided by the player. This will show if the sequence typed by the player is correct or incorrect.
(00:06:46) Explain line 20 of the code that converts the numbers provided by the players into a list of integers.

On Codefather.tech you can find further examples of creating a list of random numbers in Python: https://codefather.tech/blog/create-l...


Auf dieser Seite können Sie das Online-Video Do You Know How to Create a Memory Game in Python? mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CodeFatherTech 04 Juni 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 589 Mal angesehen und es wurde von 10 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!