Python script To extract SSL certificate issue and expiry date from a specific domain entered by the user in Python 3.11.5, you can use the ssl and socket libraries. Python Program Code: import ssl import socket def SSL_info(domain): try: context = ssl.create_default_context() with socket.create_connection((domain, 443)) as sock: with context.wrap_socket(sock, server_hostname=domain) as ssock: cert = ssock.getpeercert() issue_date = cert[‘notBefore’] expiry_date = cert[‘notAfter’] return issue_date,… Continue reading Python Script To Extract SSL certificate issue and expiry date from a specific domain entered by the user in Python 3.11.5
In this program, we first import the requests and BeautifulSoup packages. We define the URL to scrape as url, which is the weather forecast page for Mumbai on AccuWeather. We then send a GET request to the URL using requests.get and store the response in response. We parse the HTML content of the response using… Continue reading Python program that uses the requests and BeautifulSoup packages to scrape the weather forecast for Mumbai from the website.
In this program, we first ask the user for input of a number of minutes. We then convert the minutes to hours by dividing by 60. We then convert the hours to days by dividing by 24, and so on, until we have converted weeks to months (assuming 4 weeks per month). We then print… Continue reading Python program that converts minutes to hours, hours to days, and so on
Program Source Code: import wikipedia Ask the user for input search_term = input(“Enter a term to search on Wikipedia: “) Search for the term on Wikipedia try:wikipedia.set_lang(“en”) # Set the language to Englishpage = wikipedia.page(search_term)summary = page.summaryprint(summary)except wikipedia.exceptions.PageError:print(“Sorry, no page on Wikipedia matches your search term.”) In this program, we first import the wikipedia package.… Continue reading Python program that uses the Wikipedia package to search for a term on Wikipedia and display the summary.
First, you’ll need to make sure you have the googlemaps package installed. You can do this by running pip install googlemaps in your terminal. Once you have the package installed, you can use the following code: import googlemapsfrom datetime import datetime Replace ‘YOUR_API_KEY’ with your actual API key gmaps = googlemaps.Client(key=’YOUR_API_KEY’) Ask for user input… Continue reading Python program that uses the Google Maps API to find the distance between two locations.
In this program, we use the built-in input function to ask the user for their age, and then convert the input to an integer using the int function. Next, we use an if statement to check if the user’s age is greater than or equal to 18. If it is, we print a message that the user can vote. Otherwise, we… Continue reading Python program that asks for the user’s age and checks whether they are old enough to vote.
Today I am Writing a blog on the topic “Python 3.11.1 Programming to Add Two Numbers” Python 3.11.1 is a popular programming language for beginners and experienced programmers. In this blog, I (DDSRY) will explain you, “how to write a program in Python to add two numbers”. Lets start coding, create a simple program that… Continue reading Python Programming To Add Two Numbers
This blog about, Python 3.11.1 programming is a popular coding language that is widely used in world, in various fields, including scientific research, data analysis, and Ai artificial intelligence. One of the fundamental places where Python excels is in numerical methods, which are mathematical methods used to crack problems involving continuous variables, such as those… Continue reading Python Programming and Numerical Methods
Python programming ek computer programming language hai, jiska use software development, mathematics, system scripting, aur data analysis ke liye kiya jata hai. Yeh ek high-level language hai, jisme code simple aur readable hai.Python ka syntax easy hai, jisse beginners bhi asani se sikh sakte hai. Isme modules, exceptions, dynamic data types, aur automatic memory management… Continue reading Python Programming Kya Hota Hai
Python programming ek programming language hai, jiska use karke ke, hum software development, math, scripting, data analysis, artificial intelligence, machine learning, aur baki same fields me kiya jata hai. Isko aasani se sikha ja saktha hai, user-friendly syntax aur open-source hai.