Open main menu
python-fiddle.com
Packages
Learning
AI Data Analyst
Sign In
Python coding challenges on loops
Write code online and get instant feedback on your progress with automated tests
0 of 464 solved
Check All Characters Same
Beginner
strings
functions
loops
Check Tuple for Value
Beginner
functions
loops
conditionals
Count Characters in String
Beginner
strings
functions
loops
Count Digits in String
Beginner
strings
loops
conditionals
Count Element in Tuple
Beginner
loops
functions
Count Integer Elements
Beginner
lists
functions
loops
Count Nested Lists
Beginner
lists
functions
loops
Count Number Occurrences
Beginner
lists
loops
functions
Count Odd Numbers in a List
Beginner
loops
Count Positive Numbers
Beginner
lists
loops
conditionals
Count 'std' Occurrences
Beginner
strings
loops
functions
Count Uppercase Characters
Beginner
strings
loops
conditionals
Count Vowels in a String
Beginner
loops
Find Numbers Divisible by 3 but Not 7
Beginner
loops
Find First Digit
Beginner
functions
loops
math
Double each number in a list
Beginner
loops
lists
Sort Strings in Reverse Alphabetical Order
Beginner
loops
lists
Remove Odd Characters
Beginner
strings
loops
Remove Odd Index Characters
Beginner
strings
loops
conditionals
Remove Odd Numbers from List
Beginner
lists
functions
loops
conditionals
Reverse characters in a string
Beginner
loops
strings
Sum and Average of Natural Numbers
Beginner
math
functions
loops
Sum Dictionary Values
Beginner
dictionaries
loops
functions
Armstrong Number Check
Intermediate
math
functions
conditionals
loops
Babylonian Square Root
Intermediate
math
functions
loops
Bitwise XOR Tuples
Intermediate
functions
loops
Check Dictionary Values Uniformity
Intermediate
dictionaries
functions
loops
Check Equal Tuple Lengths
Intermediate
lists
loops
functions
Check Even Divisors Count
Intermediate
math
functions
loops
conditionals
Check Even Indices for Even Numbers
Intermediate
lists
conditionals
loops
Check Number Relation to Reverse
Intermediate
functions
loops
conditionals
math
Check Overlapping Sequences
Intermediate
functions
loops
conditionals
Check Perfect Square
Intermediate
math
loops
conditionals
Check Sublist in List
Intermediate
lists
loops
Check Tuple Element Comparison
Intermediate
loops
functions
Check Woodall Number
Intermediate
math
functions
conditionals
loops
Concatenate Tuple Elements
Intermediate
strings
loops
Consecutive Pairs in List
Intermediate
lists
loops
Convert List Elements to Floats
Intermediate
lists
loops
Count Array Inversions
Intermediate
lists
loops
Count Characters Matching Alphabet Position
Intermediate
strings
loops
conditionals
Count Characters with Vowel Neighbors
Intermediate
strings
loops
conditionals
Count Divisors of Integer
Intermediate
functions
loops
math
Count Element Frequencies in a List
Intermediate
loops
lists
Count Elements Before Tuple
Intermediate
loops
conditionals
Count Identical Items in Three Lists
Intermediate
lists
loops
zip
Count List Occurrences
Intermediate
lists
dictionaries
loops
Count Lists in Tuple
Intermediate
lists
loops
Count Matching Indices
Intermediate
lists
loops
Count Odd Binary Rotations
Intermediate
strings
loops
Count Odd XOR Pairs
Intermediate
loops
conditionals
Count Pairs with Sum
Intermediate
lists
loops
functions
Count Primes Less Than N
Intermediate
functions
loops
conditionals
math
Count Set Bits
Intermediate
loops
Count Sublists Containing Element
Intermediate
lists
loops
functions
Count Unequal Pairs
Intermediate
lists
loops
functions
Count XOR Even Pairs
Intermediate
lists
loops
Cube Sum of Even Numbers
Intermediate
math
loops
functions
Cumulative Sum of Tuple List
Intermediate
lists
functions
loops
Difference of First Even and Odd
Intermediate
functions
lists
loops
conditionals
Digit Frequency Validation
Intermediate
functions
loops
conditionals
Element-wise Tuple Division
Intermediate
loops
zip
Elementwise Bitwise AND Tuples
Intermediate
loops
Calculate the exponential power of the given number
Intermediate
loops
math
Calculate the factorial of the given number
Intermediate
loops
math
Find First Odd Number
Intermediate
lists
loops
conditionals
Find Longest List
Intermediate
lists
loops
Find Max Length List
Intermediate
lists
functions
loops
Find Perfect Squares
Intermediate
math
loops
functions
First Non-Repeated Character
Intermediate
strings
loops
dictionaries
First Repeated Character
Intermediate
strings
loops
conditionals
Flatten List to Set
Intermediate
lists
sets
loops
Flatten Nested List
Intermediate
lists
recursion
loops
Group Tuples by First Element
Intermediate
lists
dictionaries
loops
Find Highest Power of 2
Intermediate
loops
math
Identify Non-Prime Numbers
Intermediate
math
functions
loops
conditionals
Index-wise Addition of Nested Tuples
Intermediate
loops
zip
Insert Element Before Each
Intermediate
lists
loops
Find Largest Negative Number
Intermediate
lists
loops
conditionals
Sort students by age
Intermediate
loops
lists
Longest Sublists Length
Intermediate
lists
functions
loops
Longest Word Length
Intermediate
strings
lists
functions
loops
Max Difference in Pairs
Intermediate
lists
functions
loops
Find Pair with Maximum Product
Intermediate
lists
loops
functions
Find Maximum Run of Uppercase Characters
Intermediate
strings
loops
conditionals
Maximize Tuple Elements
Intermediate
functions
loops
zip
Maximum Difference in Array
Intermediate
lists
functions
loops
Minimum String Rotations
Intermediate
strings
loops
Move Numbers to End
Intermediate
strings
loops
conditionals
Multiply each element in a list by its index
Intermediate
loops
enumerate
Pack Consecutive Duplicates
Intermediate
lists
loops
Positive Ratio in Array
Intermediate
lists
math
functions
loops
Product of First Even and Odd
Intermediate
lists
loops
conditionals
Calculate the product of all elements in the given list
Intermediate
loops
functools
Remove Consecutive Duplicates
Intermediate
lists
loops
Remove First and Last Occurrence of Character
Intermediate
strings
functions
loops
Remove Nested Tuples
Intermediate
loops
Reverse Vowels in String
Intermediate
strings
functions
loops
conditionals
Shell Sort Implementation
Intermediate
loops
Find Smallest List Length
Intermediate
lists
functions
loops
Smallest Power of 2
Intermediate
loops
math
Split List by Step
Intermediate
lists
loops
Calculate the square root of each element in the given list
Intermediate
loops
math
Difference Between Sum of Cubes and Sum
Intermediate
math
functions
loops
Sum of Per-Digit Difference
Intermediate
math
functions
loops
Sum of Even Factors
Intermediate
math
functions
loops
Sum Even Numbers at Even Positions
Intermediate
lists
loops
conditionals
Sum of Fourth Power of Odd Numbers
Intermediate
math
loops
functions
Sum Non-Repeated Elements
Intermediate
lists
loops
conditionals
Sum Odd Numbers in Range
Intermediate
math
functions
loops
Sum of Common Divisors
Intermediate
math
functions
loops
Sum of Divisors
Intermediate
math
functions
loops
Sum of List Range
Intermediate
lists
loops
functions
Sum of Squares of Even Numbers
Intermediate
math
functions
loops
Sum of Squares of Odd Numbers
Intermediate
math
functions
loops
Sum of XOR Pairs
Intermediate
loops
functions
Calculate the sum of squares of all elements in the given list
Intermediate
loops
functools
Tuple Multiplication
Intermediate
loops
functions
Convert Tuple to Adjacent Pair Dictionary
Intermediate
dictionaries
loops
Unique Product Calculation
Intermediate
lists
functions
sets
loops
Zero to Non-Zero Ratio
Intermediate
lists
loops
conditionals
math
Integer Equation Solver
Advanced
math
functions
loops
conditionals
Sum Amicable Numbers
Advanced
functions
loops
conditionals
math
Browse more
Newbie
Beginner
Intermediate
Advanced
errors
loops
lists
conditionals
dictionaries
strings
functions
comprehension
regex
math
sets
functional-programming
enumerate
functools
files
zip
CSV
recursion
matrices