Number guessing game - python
hello guys in today's blog we're going to learn Python basics with this one project after this project you can understand Python basics very well. the foundation is very important to becoming a pro in anything not only coding.
ok without wasting time now let's see the project
project outline:
this project is very simple we're going to tell our system to pick any number between 1 to 10 after that we want to find that number that's it. let's code to this project
requirement of this project:
1. Visual studio code editor or any other(eg: Pycharm , IDLE)
ok now let's see the code explanation
first, you need to import a random library why do we use this one to generate random numbers 1 to 10
once you import random now you want to use this to generate random numbers between 1 to 10
here is how you can do this :
1. first assign variable
2. then you have to tell to system choose between 1 to 10 for this
here is how you can do these two functions :
once you complete this you should have to assign a chance player has to find the number which system chose
#This line checks
Now we have completed this project code. here is the full code :
once you complete this project, the output will look like this :
Conclusion:
I hope you found this project easy to understand and fun to work on! If you have any questions or run into any problems, don't hesitate to comment. Happy coding 😊
Make sure to follow me on Instagram. I'll be sharing coding and DSA stuff every day. Join me for cool coding projects and learning. Let's connect and learn together! ✌
.png)
.png)
Comments
Post a Comment