Learning any programming language is a tedious task. The advantage with Python is that you can start making real projects within no time Here are some very fundamental yet powerful pieces of mode which look simple but are extremely effective and use various python packages
import time from plyer import notification while True: notification.notify( title = "Please Drink Water", message = "Keep yourself hydrated", #app_icon = "Your Path\Glass-Water.ico", timeout = 2 ) time.sleep(10)
import random random_number = random.randint(1,10) your_guess = 0 credit = 10 level = 1 #Rules print('''* Guess a number between 1-10 * You have a credit of 10 * Exact answer will fetch you +5 * If answer is +- 3 range it will give you +3 Otherwise -5''') while credit > 0: print("You are on level",level,"credit score is",credit) your_guess = int(input("Enter your Guess ")) if your_guess == random_number: credit+=3 level = level + 1 print("You guessed it right !!,number changed") random_number = random.randint(1,10) elif (random_number-3) < your_guess < (random_number+3): print("You are close but not exact, Try harder") credit+=1 level+=1 else: print("You are not even close to the number :-( ") credit-=5 if credit <= 0: print("Correct guess was",random_number) print("You reached level",level)
import pywhatkit pywhatkit.sendwhatmsg("+91xxxxxxxxxx", "Hello from Sender", 22,28)
import smtplib server = smtplib.SMTP_SSL("smtp.gmail.com",465) server.login("sender@gmail.com","password") server.sendemail("sender@gmail.com","to@gmail.com", "message to be sent") server.quit()