Skip to main content

Posts

Showing posts with the label easy

Flip a coin million times w/ Python

Photo by ZSun Fu on Unsplash Welcome everyone to my blog. I could not write a new blog post for the last year because of my heavy work schedule. So I thought to write an article on a recent project done by me. Let's get started. Imagine that you want to flip a coin. Perhaps you don't need a complex python script to flip and find a result but what if you're going to flip a coin 2 million times and check the results. Then you have to invite Python to do all the hard work for you. If you are not interested to dive deep, just go ahead and check my project on Github. And also don't forget to follow my profile for the latest fun projects. and if you are a Python expert please feel free to fork.  🍴🍴 Link: https://github.com/chamodhk/coin-flipper Import the libraries you want! If you aren't using a GUI all you have to import is the random module. If you are an expert you don't have to import it too because you can write a function to get the random part done. im...

Get Unlimited Traffic to your website with Python | Make your fun a traffic to your site.

GET UNLIMITED TRAFFIC To your WEBSITE/ BLOG/ Youtube Channel with Python. Getting unlimited traffic is very simple with python. But this is not real traffic because the only visitor is just you. You cannot turn this traffic into money but you can have really fun stuff with your programming skills. JUST follow these simple steps. STEP 1 import webbrowser import webbrowser module to get started. Here the webbrowser driver is built-in so that you have not to install it using PIP STEP 2 install pynput module using PIP if you don't know how to set up pip on your computer this article is just for you.  PIP open cmd or terminal and type this command kavindu@kavindu-MS : ~ $ pip3 install pynput Here I use Ubuntu and I have to type pip3 and if you are a windows user you have to type it as pip write this code  import webbrowser import time from pynput.keyboard import Controller my_url = "https://blogofchamodh.blogspot.com/" keyboard =Controller() def refresh_tab (): key...