Motive There are different types of modules in python which not everyone knows so we thought of introducing them to you guys. Let's start! Note: This is not a tutorial of how to use these but is to show that these modules also exist and if you want to know more you can visit there own page and if you want us to explain leave a comment below. Links to there page are also given below. Hope you found something useful. 1.Wikipedia Yes, there is a module called Wikipedia in python, you can easily install Wikipedia by pip install wikipedia . We cannot rely on this module for advanced use. It was designed for ease of use and simplicity. Learn More Here . Here is a simple example: import wikipedia wikiPython = wikipedia.summary("Python", sentences=2) print(wikiPython) One big disadvantage is that it works only if the interne...
Motive
Pranking friends is really fun. So, I thought of sharing an idea for pranking your friends with python. Or if you have any problem with your power button you could use it.
The Project
It's really very simple no pip installs and just two lines of code and we are done. First let's import a module called os, again no need for any pip it's pre-installed in python.
Import the module and give the command for shutdown:
Here shutdown is the command for shutdown we can even use sleep or restart, /s tells that the shutdown should happen in that PC and /t tells about the time and 0 is the seconds that are left for the shutdown to happen it can be from 0 to 315360000 i.e 5 years.
But even a person who knows to read English can understand the code so we have to hide it somewhere either in code or just a lot of comments. You can get some lorem text here and embed those lorem texts in triple inverted commas like this:
Or you can do what I did, I made a turtle code that prints HAHA on the turtle canvas and then the computer shuts down. Since it's so long it's hard for them to find ou that code for the shutdown and tell them that you have made an amazing turtle art you can find that code here:- https://timesofpython.blogspot.com/p/turtle-art.html
Full code
If you have any doubts or errors in the program feel free to comment down below and I will respond as early as possible. And if I have made any mistake please correct me in the comment box below. Don't forget to follow us for such python related content.
💕💞
ReplyDeleteMricacarri Julie Ritter download
ReplyDeleteringhandsoma