Skip to content

Code Challenges found all over the web. Solved in Python including tests.

Notifications You must be signed in to change notification settings

vmueller71/code-challenges

Repository files navigation

code-challenges

Code Challenges found all over the web. Solved in Python including tests.

Alphabet Positions

Write a program that sums the alphabet positions of the characters in a provided string. Characters are treated case insensitive.

Closest Neighbour

Read the numbers stored in a 2D matrix that contains only the integers 1, 0, or 2. Then from the position in the matrix where a 1 is, return the number of spaces either left, right, down, or up you must move to reach an enemy which is represented by a 2. You are able to wrap around one side of the matrix to the other side as well.

Divisible by 5

Write a function that accepts a sequence of comma separated binary numbers as a string and then checks whether they are divisible by 5 or not. The numbers that are divisible by 5 are to be returned as a comma separated string.

Heads and Legs

Write a program to solve this puzzle: We count 35 heads and 94 legs among the cats and parrots in a pet store. How many cats and how many parrots do we have?

Kaprekar's Constant

Write a function that returns the amount of steps needed to get to Kaprekar's constant

Liquid Distribution

Write a function liquid_distribution that distributes a hazardous liquid between special bottles.

Maximum Square

Determine the area of the largest square submatrix that contains all 1s from a given square matrix of 0s and 1s.

Military Time

Convert a time string of the format hh:mm:ssAM or hh:mm:ssPM (07:02:57AM or 10:12:09PM) into military time (24h).

Numeronyms

Write a function n7m to create Numeronyms.

Question marks

Write the function that accepts a string parameter, which can contain single digit numbers, letters, and question marks, and check if there are exactly 3 question marks between every pair of two numbers that add up to 10.

Robot Attack

You are being attacked by an army of robots! Write a function to find out if you can survive.

Scale Balancing

Write a function to determine if you can balance a scale by using the least amount of weights from a given list, but using at most only 2 weights per side.

About

Code Challenges found all over the web. Solved in Python including tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages