Posts

Complete HTML5 course

Heading Paragraph and Emmet <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Heading Paragraph and Emmet </title> </head> <body> <h1>Heading</h1> <h2>Heading</h2> <h3>Heading</h3> <h4>Heading</h4> <h5>Heading</h5> <h6>Heading</h6> <!-- lorem23 for dummy text with 23 words --> <p>Lorem ipsum dolor sit amet <strong>use strong for bold text</strong> adipisicing elit. Vitae eius dicta ullam ex error enim corrupti fuga, voluptas porro doloremque aperiam, empesis <em>this is for emphesise or italic</em> recusandae tempora voluptates expedita consectetur magnam sae...

Login Page design using Html and CSS only

Image
html code <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://kit.fontawesome.com/0b287dd95e.js" crossorigin="anonymous"></script> <title>Login to MySky</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <form action=""> <h1>Login to MySky</h1> <div class="box"> <i class="fa fa-envelope"></i> <input type="email" name="email" id="email" placeholder="Enter Your Email"> </div> ...

Python virtual assistance

Python vitual assistance This virtual assistance is just like your google assistanece or siri!, it perform many tasks like open browers/youtube/google, told you time, date and days, This is a Beta version of this assistance so it not perform complicated task right now you can add more code and bring it to next level ! import pyttsx3 import datetime import speech_recognition as sr import wikipedia import webbrowser import os import requests from bs4 import BeautifulSoup import pywhatkit engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') # print(voices[1].id) engine.setProperty('voice',voices[1].id) # l = ['play music','search youtube'] def speak(audio): engine.say(audio) engine.runAndWait() def wishMe(): hour = int(datetime.datetime.now().hour) if hour &GreaterEqual; 0 and hour < 12: speak("good morning !") elif hour &GreaterEqual; 12 and hour < 18: ...

Python Password Generator

Python Random Password Generator with the help of below code you can get a random combination of alphanumaric + punctuation strong password import string import random s1 = string.ascii_lowercase # print(s1) s2 = string.ascii_uppercase # print(s2) s3 = string.digits # print(s3) s4 = string.punctuation # print(s4) while True: try: plen = int(input("enter password length\n")) break except ValueError: print("Please Enter numeric value") s = [] s.extend(list(s1)) s.extend(list(s2)) s.extend(list(s3)) s.extend(list(s4)) # print(s) # random.shuffle(s) # print(s) print("Your password is: ") # print("".join(s[0:plen])) print("".join(random.sample(s,plen))) with open("Saved_Password.txt","a") as f: f.write(str("".join(random.sample(s,plen)))) f.write("\n") print("Your password has been saved") Happy coding :)

Scissor, Paper , Rock Game

Image
Scissor, Paper , Rock Game code # Scissors Paper Rock GAME import random def gameWin(comp,you): if comp == you: return None elif comp == 's': if you == 'p': return False elif you == 'r': return True elif comp == 'p': if you == 'r': return False elif you == 's': return True elif comp == 'r': if you == 's': return False elif you == 'p': return True print("comp turn: Scissors(s) Paper(p) or Rock(r)?") randNo = random.randint(1,3) if randNo == 1: comp = 's' elif randNo == 2: comp = 'p' elif randNo == 3: comp = 'r' you = input("Your turn: Scissors(s) Paper(p) or Rock(r)?") a = gameWin(comp,you) print(f"Computer chose {comp}") print(f"You chose {you}") if a == None: print ("...

Guess the right number

Guess the right number from 0 to 100 import random randNumber = random.randint(1,100) # print(randNumber) userGuess = None guesses = 0 while (userGuess != randNumber): userGuess = int(input("Enter your guess\n")) guesses += 1 if (userGuess == randNumber) : print("You guessd it right!") else: if (userGuess>randNumber): print("You guessd it worng! Enter a smaller number") else: print("You guessd it worng! Enter a larger number") print(f"You gussed the right number in {guesses} guesses") code for save and update highscore with open("high_score.txt","r") as f: highscore = int(f.read()) if(guesses > highscore): print('You just break high score!') with open("high_score.txt",'w') as f: f.write(str(guesses))

Drink water notification

Image
Drink notification import time from plyer import notification if __name__ == "__main__": notification.notify( title = "Please Drink Water", message = "Drinking water is good for your health", app_icon = "D:\Python chapter\Projects\Drink Notification\water_icon.ico", timeout = 10 ) Drink notification output