Login
Discover
Waves
Communities
Login
Signup
python-dev
@python-dev
58
Followers
36
Following
2
Follow
Resource Credits
Available
Used
Created
2018-10-10 14:29
RSS Feed
Subscribe
Posts
Blog
Posts
Comments
Communities
Wallet
python-dev
python-dev
2020-03-22 09:48
Python Program to Check Prime Number
# Program to check if a number is prime or not num = 407 # To take input from the user #num = int(input("Enter a number: ")) # prime numbers are greater than 1 if num > 1: # check for factors
$ 0.512
2
1
python-dev
python-dev
2020-03-22 09:42
Python Program to Find the Largest Among Three Numbers
# Python program to find the largest number among the three input numbers # change the values of num1, num2 and num3 # for a different result num1 = 10 num2 = 14 num3 = 12 # uncomment following lines to
$ 0.520
2
1
python-dev
python-dev
2020-03-22 09:36
Python Program to Check Leap Year
# Python program to check if year is a leap year or not year = 2000 # To get year (integer input) from the user # year = int(input("Enter a year: ")) if (year % 4) == 0: if (year % 100) == 0:
python-dev
python-dev
2020-03-22 09:30
Python Program to Check if a Number is Odd or Even
# Python program to check if the input number is odd or even. # A number is even if division by 2 gives a remainder of 0. # If the remainder is 1, it is an odd number. num = int(input("Enter a number:
python-dev
python-dev
2020-03-22 09:24
Python Program to Check if a Number is Positive, Negative or 0
num = float(input("Enter a number: ")) if num > 0: print("Positive number") elif num == 0: print("Zero") else: print("Negative number")
python-dev
python-dev
2020-03-22 09:18
Python Program to Convert Celsius To Fahrenheit
# Python Program to convert temperature in celsius to fahrenheit # change this value for a different result celsius = 37.5 # calculate fahrenheit fahrenheit = (celsius * 1.8) + 32 print('%0.1f degree Celsius
python-dev
python-dev
2020-03-22 09:12
Python Program to Convert Kilometers to Miles
# Taking kilometers input from the user kilometers = float(input("Enter value in kilometers: ")) # conversion factor conv_fac = 0.621371 # calculate miles miles = kilometers * conv_fac print('%0.2f
python-dev
python-dev
2020-03-22 09:06
Python Program to Generate a Random Number
# Program to generate a random number between 0 and 9 # importing the random module import random print(random.randint(0,9))
python-dev
python-dev
2020-03-22 09:00
Python Program to Swap Two Variables
# Python program to swap two variables x = 5 y = 10 # To take inputs from the user #x = input('Enter value of x: ') #y = input('Enter value of y: ') # create a temporary variable and swap the values temp
python-dev
python-dev
2020-03-21 16:12
Python Program to Solve Quadratic Equation
# Solve the quadratic equation ax**2 + bx + c = 0 # import complex math module import cmath a = 1 b = 5 c = 6 # calculate the discriminant d = (b**2) - (4*a*c) # find two solutions sol1 =
python-dev
python-dev
2020-03-21 16:05
Python Program to Calculate the Area of a Triangle
# Python Program to find the area of triangle a = 5 b = 6 c = 7 # Uncomment below to take inputs from the user # a = float(input('Enter first side: ')) # b = float(input('Enter second side: ')) # c =
python-dev
python-dev
2020-03-21 15:58
Python Program to Find the Square Root
# Python Program to calculate the square root # Note: change this value for a different result num = 8 # To take the input from the user #num = float(input('Enter a number: ')) num_sqrt = num ** 0.5 print('The
python-dev
python-dev
2020-03-21 15:52
Python Program to Add Two Numbers
# This program adds two numbers num1 = 1.5 num2 = 6.3 # Add two numbers sum = float(num1) + float(num2) # Display the sum print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
python-dev
tag1
2020-03-21 10:51
!
Downvoted by users, Reveal content
Python Program to Print Hello world!
# This program prints Hello, world! print('Hello, world!')
python-dev
python-dev
2020-03-16 13:35
Introduction to Git (3) -Committing Changes
Committing Changes When you commit changes, you are telling Git to make a snapshot of this state in the repo. Do that now by using the git commit command. The -m option tells Git to use the commit message
python-dev
python-dev
2020-03-16 00:18
Introduction to Git (2) - Adding a New File
Now create a file that Git doesn’t know about. With your favorite editor, create the file hello.py, which has just a print statement in it. # hello.py print('hello Git!') If you run git status again, you’ll
python-dev
python-dev
2020-03-16 00:13
Introduction to Git (1)
Git is a distributed version control system (DVCS). Creating a New Repo To work with Git, you first need to tell it who you are. You can set your username with the git config command: $ git config --global
python-dev
Airdrops
2020-03-15 12:42
Ecoin Airdrop $5 listed t Probit ( Only requires email registration only, Airdrop 750 coins for registration and each referral ),
Ecoin is the world's fastest-growing Cryptocurrency powered by world’s first ‘AI driven email-based proxy identity engine’ which aims to launch the world’s biggest airdrop .Ecoin is based on EOS blockchain,
python-dev
Crypto Talk
2020-03-13 22:15
Search substring in all text files in a directory
The following code searches a specific substring in all 'txt' file in a directory. import os import time directory = 'D:/Python/file1/' for filename in os.listdir(directory): filesize =
python-dev
python-dev
2020-03-13 12:39
Selenium Managing Multiple Tabs
WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.get("URL"); String newWindow = driver.getWindowHandle();
← Latest
Older →