Monday, 15 August 2022

Day 74 : Python Program to Check a Number is a Disarium Number

 Number = int(input("Enter the Number to Check Disarium Number = "))length = len(str(Number))Temp = NumberSum = 0rem = 0 #clcoding.comwhile Temp > 0:    rem = Temp % 10    Sum = Sum + int(rem**length)   ...

Day 73 : Get address detail through python code

 from geopy.geocoders import Nominatim # Using Nominatim Apigeolocator = Nominatim(user_agent="geoapiExercises")# Zipocde inputa = input("Enter the zipcode : ")zipcode = a   # Using geocode()location = geolocator.geocode(zipcode)#...

Sunday, 14 August 2022

Day 68 : Python program to find compound interest

 # Python program to find compound interestdef compound_interest(principle, rate, time): # Calculates compound interest Amount = principle * (pow((1 + rate / 100), time)) CI = Amount - principle print("Compound interest is", CI)P=float(input("Enter...

Day 67 : Python program to add two numbers

 # Python program to add two numbersnumber1 = input("First number: ")number2 = input("Second number: ")# Adding two numbers# User might also enter float numberssum = float(number1) + float(number2)# Display the sum# will print value in...

Day 65 : Python program to find the factorial of a number

 # To take input from the usernum = int(input("Enter a number : "))factorial = 1# check if the number is negative, positive or zeroif num < 0:   print("Sorry, factorial does not exist for negative numbers")elif num == 0: ...

Day 63 : Python Program to Remove Punctuations From a String

 # define punctuationpunctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''# To take input from the usermy_str = input("Enter Your String : ")# remove punctuation from the stringno_punct = ""for char in my_str:   if char...

Day 61 : Python Program to Print the Fibonacci sequence

 # Program to display the Fibonacci sequence up to n-th termnterms = int(input("How many terms? "))# first two termsn1, n2 = 0, 1count = 0# check if the number of terms is validif nterms <= 0:   print("Please enter a positive...

Day 59 : PDF file protection using password

 #pip install PyPDF2from PyPDF2 import PdfFileWriter, PdfFileReaderimport getpasspdfwriter=PdfFileWriter()pdf=PdfFileReader('E:\\clcoding.pdf')for page_num in range(pdf.numPages):    pdfwriter.addPage(pdf.getPage(page_num))password=getpass.getpass(prompt='Enter...

Day 58 : Scatter Plot using Matplotlib in Python

 import matplotlib.pyplot as pyplot# Create datariding = ((17, 18, 21, 22, 19, 21, 25, 22, 25, 24),(3, 6, 3.5, 4, 5, 6.3, 4.5, 5, 4.5, 4))swimming = ((17, 18, 20, 19, 22, 21, 23, 19, 21, 24),(8, 9, 7, 10, 7.5, 9, 8, 7, 8.5, 9))sailing...

Day 57 : Number guessing game in Python

 import randomimport mathlower = int(input("Enter Lower bound:- ")) upper = int(input("Enter Upper bound:- "))# generating random number between the lower and upperx = random.randint(lower, upper)print("\n\tYou've only ",round(math.log(upper...

Saturday, 13 August 2022

Day 46 : Get Zip Code with given location using GeoPy in Python

 from geopy.geocoders import Nominatimgeolocator = Nominatim(user_agent="geoapiExercises")place=input("Enter City Name: ")location = geolocator.geocode(place)print(location)#clcoding.comEnter City Name: AundhAundh, Pune City, Pune, Maharashtra,...

Day 45 : Download YouTube videos in Python

 #import pytube library to download the videoimport pytube#Ask for the url of videourl = input("Enter video url: ") #specify the starage path of videopath="E:"#magic line to download the videopytube.YouTube(url).streams.get_highe...

Day 44 : Voice Recorder in Python

 #import required modulesimport sounddevicefrom scipy.io.wavfile import write#sample_ratefs=44100#Ask to enter the recording timesecond=int(input("Enter the Recording Time in second: "))print("Recording....\n")record_voice=sounddevice.rec(int(second...

Day 43 : Search anything in Python

 pip install pywhatkitimport pywhatkit as kitsearchitem=(input("Enter the topic : "))kit.info(searchitem,100)#clcoding.comEnter the topic : Python Coding Python is a high-level, interpreted, general-purpose programming language. Its design...

Day 41: Image to Pencil Sketch in Python

 #...........Convert image to pencil sketch......!import cv2#specify the path to image (Loading image image)image1 = cv2.imread('E:\demo.png')window_name = 'Original image'# Displaying the original image cv2.imshow(window_name,image1)#...

Day 40 : Calculation of Execution Time of a Python Program

 from time import timestart = time()#code startemail = input("Enter Your Email: ")email=email.strip()slicer_index=email.index("@")username = email[:slicer_index]domain_name = email[slicer_index+1:]print("Your user name is ",username,"...

Day 39 : Code and Decode QR in Python

 import pyqrcodeimport pnglink = "https://www.instagram.com/pythonclcoding/"qr_code = pyqrcode.create(link)qr_code.png("instagram1.png", scale=5)#clcoding.comfrom pyzbar.pyzbar import decodefrom PIL import ImagedecocdeQR = decode(Imag...

Day 38 : Scrape Table from a Website using Python

 import urllib.requestimport pandas as pd#List of publicly listed ITES companies of Indiaurl = "https://en.wikipedia.org/wiki/List_of_publicly_listed_ITES_companies_of_India"with urllib.request.urlopen(url) as i:    html = i.read() ...

Day 37 : Sequence Matcher in Python

 from difflib import SequenceMatchertext1 = input("Enter 1st sentence : ") text2 = input("Enter 2nd sentence : ")sequenceScore = SequenceMatcher(None, text1, text2).ratio()print(f"Both are {sequenceScore * 100} % similar")#clcoding.comEnter...

Popular Posts

Categories

100 Python Programs for Beginner (98) AI (39) Android (24) AngularJS (1) Api (2) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (197) C (77) C# (12) C++ (83) Course (67) Coursera (251) Cybersecurity (25) Data Analysis (3) Data Analytics (3) data management (11) Data Science (149) Data Strucures (8) Deep Learning (21) Django (16) Downloads (3) edx (2) Engineering (14) Euron (29) Events (6) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Generative AI (11) Google (36) Hadoop (3) HTML Quiz (1) HTML&CSS (47) IBM (30) IoT (1) IS (25) Java (93) Java quiz (1) Leet Code (4) Machine Learning (85) Meta (22) MICHIGAN (5) microsoft (4) Nvidia (4) Pandas (4) PHP (20) Projects (29) pyth (1) Python (1052) Python Coding Challenge (456) Python Quiz (124) Python Tips (5) Questions (2) R (70) React (6) Scripting (3) security (3) Selenium Webdriver (4) Software (17) SQL (42) UX Research (1) web application (8) Web development (4) web scraping (2)

Followers

Python Coding for Kids ( Free Demo for Everyone)