Login
Discover
Waves
Decks
Upgrade
Login
Signup
Topics
New
Trending
Hot
New
New
Trending
Hot
New
Controversial
Rising
Promoted
python-dev
python-dev
python-dev
Sunday, March 22, 2020 11:59 AM
Python Program to Sort Words in Alphabetic Order
# Program to sort alphabetically the words form a string provided by the user my_str = "Hello this Is an Example With cased letters" # To take input from the user #my_str = input("Enter
$ 0.467
4
2
python-dev
python-dev
Sunday, March 22, 2020 11:46 AM
Python Program to Check Whether a String is Palindrome or Not
# Program to check if a string is palindrome or not my_str = 'aIbohPhoBiA' # make it suitable for caseless comparison my_str = my_str.casefold() # reverse the string rev_str = reversed(my_str) # check
$ 0.408
3
1
python-dev
python-dev
Sunday, March 22, 2020 11:40 AM
Python Program to Multiply Two Matrices
# Program to multiply two matrices using nested loops # 3x3 matrix X = [[12,7,3], [4 ,5,6], [7 ,8,9]] # 3x4 matrix Y = [[5,8,1,2], [6,7,3,0], [4,5,9,1]] # result is 3x4 result = [[0,0,0,0], [0,0,0,0],
$ 0.382
4
1
python-dev
python-dev
Sunday, March 22, 2020 11:34 AM
Python Program to Transpose a Matrix
# Program to transpose a matrix using a nested loop X = [[12,7], [4 ,5], [3 ,8]] result = [[0,0,0], [0,0,0]] # iterate through rows for i in range(len(X)): # iterate through columns for j in range(len(X[0])):
$ 0.467
4
1
oadissin
Splinterlands
Thursday, August 7, 2025 9:06 PM
Promoted
Splinterlands Social Media Challenge: Shaky Ground Will not Stop Fast Warriors
Social media challenge gives Spllinters the chance to explore hidden potential and collaboration in the arena. Arcana influence is growing in the arena. Do Splinters exploit the new abilities?
$ 7.952
227
5
1
python-dev
python-dev
Sunday, March 22, 2020 11:28 AM
Python Program to Add Two Matrices
# Program to add two matrices using nested loop X = [[12,7,3], [4 ,5,6], [7 ,8,9]] Y = [[5,8,1], [6,7,3], [4,5,9]] result = [[0,0,0], [0,0,0], [0,0,0]] # iterate through rows for i in range(len(X)): #
$ 0.438
3
2
python-dev
python-dev
Sunday, March 22, 2020 11:22 AM
Python Program to Display Fibonacci Sequence Using Recursion
# Python program to display the Fibonacci sequence def recur_fibo(n): if n <= 1: return n else: return(recur_fibo(n-1) + recur_fibo(n-2)) nterms = 10 # check if the number of terms is valid if nterms
$ 0.407
3
1
python-dev
python-dev
Sunday, March 22, 2020 11:15 AM
Python Program to Display Calendar
# Program to display calendar of the given month and year # importing calendar module import calendar yy = 2014 # year mm = 11 # month # To take month and year input from the user # yy = int(input("Enter
$ 0.492
3
2
python-dev
python-dev
Sunday, March 22, 2020 11:08 AM
Python Program to Shuffle Deck of Cards
# Python program to shuffle a deck of card # importing modules import itertools, random # make a deck of cards deck = list(itertools.product(range(1,14),['Spade','Heart','Diamond','Club'])) # shuffle the
$ 0.440
2
2
valerianis
Caturday
Friday, August 1, 2025 2:56 PM
Promoted
New Kitten in Our Family
We have recently found this small homeless kitten and brought him to our country house. We called him Marsik and he is around three weeks on these photos. Learning and growing quickly. Will see where it
$ 1.145
44
9
2
python-dev
python-dev
Sunday, March 22, 2020 11:02 AM
Python Program to Make a Simple Calculator
# Program make a simple calculator # This function adds two numbers def add(x, y): return x + y # This function subtracts two numbers def subtract(x, y): return x - y # This function multiplies two numbers
$ 0.445
2
2
python-dev
python-dev
Sunday, March 22, 2020 10:55 AM
Python Program to Find the Factors of a Number
# Python Program to find the factors of a number # This function computes the factor of the argument passed def print_factors(x): print("The factors of",x,"are:") for i in range(1,
$ 0.452
2
python-dev
python-dev
Sunday, March 22, 2020 10:49 AM
Python Program to Find LCM
# Python Program to find the L.C.M. of two input number def compute_lcm(x, y): # choose the greater number if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y
$ 0.458
2
python-dev
python-dev
Sunday, March 22, 2020 10:43 AM
Python Program to Find HCF or GCD
# Python program to find H.C.F of two numbers # define a function def compute_hcf(x, y): # choose the smaller number if x > y: smaller = y else: smaller = x for i in range(1, smaller+1): if((x % i ==
$ 0.465
2
veryhappyday
Korean Hive Village
Sunday, August 3, 2025 10:35 PM
Promoted
Korean Hive Village Contest #8 Popular K-Content 🎁 100 HSBI
Korean Hive Village Contest #8 🎁 Poppular K-Content, The most popular K-content items are K-Pop, K-Drama, and K-Movie. Please choose one of the three and write a review.
$ 7.040
150
17
21
python-dev
python-dev
Sunday, March 22, 2020 10:37 AM
Python Program to Find ASCII Value of Character
# Program to find the ASCII value of the given character c = 'p' print("The ASCII value of '" + c + "' is", ord(c))
$ 0.472
2
python-dev
python-dev
Sunday, March 22, 2020 10:31 AM
Python Program to Convert Decimal to Binary, Octal and Hexadecimal
# Python program to convert decimal into other number systems dec = 344 print("The decimal value of", dec, "is:") print(bin(dec), "in binary.") print(oct(dec), "in
$ 0.480
2
python-dev
python-dev
Sunday, March 22, 2020 10:25 AM
Python Program to Find Numbers Divisible by Another Number
# Take a list of numbers my_list = [12, 65, 54, 39, 102, 339, 221,] # use anonymous function to filter result = list(filter(lambda x: (x % 13 == 0), my_list)) # display the result print("Numbers divisible
$ 0.486
2
python-dev
python-dev
Sunday, March 22, 2020 10:19 AM
Python Program to Find Armstrong Number in an Interval
# Program to check Armstrong numbers in a certain interval lower = 100 upper = 2000 for num in range(lower, upper + 1): # order of number order = len(str(num)) # initialize sum sum = 0 temp = num while
$ 0.504
2
ruhlar
SciFi Multiverse
Tuesday, August 5, 2025 7:34 AM
Promoted
A painful memory that still stays with me, the flood in ikorodu Lagos.
source Natural disasters can happen anytime, and most times, we don’t even see them coming. I’ve witnessed a few in my life, though not too extreme, but serious enough to leave an impact. The one that
$ 1.539
49
15
python-dev
python-dev
Sunday, March 22, 2020 10:13 AM
Python Program to Check Armstrong Number
# Python program to check if the number is an Armstrong number or not # take input from the user num = int(input("Enter a number: ")) # initialize sum sum = 0 # find the sum of the cube of each
$ 0.492
2
python-dev
python-dev
Sunday, March 22, 2020 10:07 AM
Python Program to Print the Fibonacci sequence
# Program to display the Fibonacci sequence up to n-th term nterms = int(input("How many terms? ")) # first two terms n1, n2 = 0, 1 count = 0 # check if the number of terms is valid if nterms
$ 0.512
3
python-dev
python-dev
Sunday, March 22, 2020 10:01 AM
Python Program to Display the multiplication Table
# Multiplication table (from 1 to 10) in Python num = 12 # To take input from the user # num = int(input("Display multiplication table of? ")) # Iterate 10 times from i = 1 to 10 for i in range(1,
$ 0.526
3
1
python-dev
python-dev
Sunday, March 22, 2020 9:54 AM
Python Program to Find the Factorial of a Number
# Python program to find the factorial of a number provided by the user. # change the value for a different result num = 7 # To take input from the user #num = int(input("Enter a number: "))
$ 0.250
3
1
Top communities
Create decentralized community