Learn Python while playing games ๐ŸŽฏ

Five Ideas to make a game using Python๐Ÿ

๐Ÿงต
1โƒฃ Dice Roller

Have no dice for your ludo game?

No worries you can create one using Python in just a few minutes.

Just use a random library and make one for yourself๐Ÿ˜‰
2โƒฃ Hangman

You can make this game in Python too ;)

The word to guess is represented by a row of dashes.

If the player guesses a letter that exists in the word, the script writes it in all its correct positions. The player has 10 turns to guess the word.
3โƒฃ Rock Paper Scissors

Here is my complete thread on how you can easily make a Rock Paper Scissor game using Python :)

๐Ÿ‘‡๐Ÿงต

4โƒฃ Number Guessing

This is going to be a simple guessing game where the computer will generate a random number between 1 to 10, and the user has to guess it in 5 attempts.

You can do this easily using the random library and some if-else statements ๐Ÿ˜„
5โƒฃ Tic-Tac-Toe!!

Tic-tac-toe is a very popular game and I think all of us have at least played it once in our life.

You can develop this game in python very easily.

It will only use some lists and some if-else statements to create this game in python. ๐Ÿ˜
Hey,

Thanks for reading the whole thread!!

If you like my content then please Re-Tweet the first tweet of the threadโค๏ธ

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Saurav Jain

Saurav Jain Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Sauain

14 Jul
๐—›๐—ฎ๐—ฎ๐—ฟ ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ฒ๐˜€๐Ÿ‘จโ€๐Ÿ’ป

- Arguably OpenCVโ€™s ( Open source Computer Vision ) most popular object detection algorithm.

-What is it?
-Algorithm
-Limitation
-Applications

A BIG Thread ๐Ÿงต๐Ÿ‘‡ Image
We are living in an era, where object detection is used everywhere.

From security cameras to our mobile phones, it is used everywhere.

Haar classifiers, classifiers were used in the ๐—ณ๐—ถ๐—ฟ๐˜€๐˜ ๐—ฟ๐—ฒ๐—ฎ๐—น-๐˜๐—ถ๐—บ๐—ฒ ๐—ณ๐—ฎ๐—ฐ๐—ฒ ๐—ฑ๐—ฒ๐˜๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ. Image
๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—›๐—ฎ๐—ฎ๐—ฟ ๐—–๐—ฎ๐˜€๐—ฐ๐—ฎ๐—ฑ๐—ฒ โ”

Haar Cascade classifiers are an effective way for object detection.

This method was proposed by Paul Viola and Michael Jones in their paper Rapid Object Detection using a Boosted Cascade of Simple Features.
Read 13 tweets
12 Jul
Seven Python Math Library Functions ๐Ÿงฎ ๐Ÿ

A beginner should know about these important functions, it will make your work easy!!

Thread ๐Ÿ˜๐Ÿงต Image
1โƒฃ ๐˜€๐—พ๐—ฟ๐˜

In python, to find the square root of any number ( 3 is the square root of 9 ) you don't have to use power operator.

There is a special function " sqrt " which square roots the number given it as a parameter :)

๐Ÿ”— Code Image
2โƒฃ ๐—ฝ๐—ผ๐˜„

In the above tweet, we have learned how to square root a given number.

A square root is actually a number raised to a power of 0.5

But what if we want 3 or something as power.

Here we use " pow(x,y) " it returns x raised to power y.

๐Ÿ”— Code Image
Read 9 tweets
10 Jul
Five Python Libraries for Machine Learning ๐Ÿ

Thread ๐Ÿงต๐Ÿ‘‡
1โƒฃ ๐—ง๐—ฒ๐—ป๐˜€๐—ผ๐—ฟ๐—™๐—น๐—ผ๐˜„

It is an open-source library created by the Google Brain team.

It is very popular for high-performance numerical computation.

It has an ecosystem of tools, libraries, and community resources for building and deploying powerful ML applications.
2โƒฃ ๐—ž๐—ฒ๐—ฟ๐—ฎ๐˜€

Keras is a deep learning API written in Python, running on top of the machine learning platform TensorFlow.

It is a high-level neural networks API capable of running on top of TensorFlow, CNTK, or Theano.

It can run seamlessly on both CPU and GPU.
Read 7 tweets
9 Jul
How to make a simple Rock, Paper, Scissor game using Python? โœŠ๐ŸคšโœŒ๏ธ

Here in this thread, I will try to make the process easier for you :)

PS - Github link for the project in the last tweet of the thread.

Thread ๐Ÿงต๐Ÿ‘‡ Image
๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ถ๐—ป๐—ด ๐—น๐—ถ๐—ฏ๐—ฟ๐—ฎ๐—ฟ๐—ถ๐—ฒ๐˜€

As usual, in every project, the first step is to upload the required libraries for our project

So here we are going to import the random library of python.

Random is widely used to select randomly a choice from all the choices.

๐Ÿ”—Code Image
๐—ง๐—ฎ๐—ธ๐—ถ๐—ป๐—ด ๐—ถ๐—ป๐—ฝ๐˜‚๐˜ ๐—ณ๐—ฟ๐—ผ๐—บ ๐˜‚๐˜€๐—ฒ๐—ฟ

So the next step is to taking input from the user.

The possible choices here are rock, paper, scissors.

We will use the input function to do so.

๐Ÿ”—Code Image
Read 9 tweets
6 Jul
๐—œ๐—ป๐˜๐—ฟ๐—ผ ๐˜๐—ผ ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด ๐Ÿ’ก

Let me introduce you to the absolute starting of Machine Learning

-What is ML?
-Its types
-Some real-world applications
๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐— ๐—Ÿ? ๐Ÿ’ป

I have said this earlier too that I have done various ML courses but one of the best definition is from Andrew Ng course-

"Machine learning is the science of getting computers to act without being explicitly programmed."
๐—ง๐˜†๐—ฝ๐—ฒ๐˜€ ๐—ผ๐—ณ ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ด

-Supervised
-Unsupervised
-Reinforcement
-Semi-supervised
Read 9 tweets
5 Jul
5 Free Courses/Sites for Beginners to learn Python ๐Ÿ’ป

๐Ÿงต๐Ÿ‘‡
1โƒฃ ๐—น๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ฝ๐˜†๐˜๐—ต๐—ผ๐—ป .๐—ผ๐—ฟ๐—ด

The best way to learn python is to read docs and do the hands-on.

And this site is perfect to get started with python.

This site is supported by Datacamp.

๐Ÿ”—learnpython.org Image
2โƒฃ ๐—œ๐—ป๐—ณ๐˜†๐—ง๐—ค

This learning platform is created by one of India's topmost tech company Infosys.

If you are planning to learn python in deep, you should start with InfyTQ courses for python.

You should start with Foundation courses.

๐Ÿ”—infytq.onwingspan.com/en/page/home Image
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(