# Python coding challenges for interviews

Carvia Tech | October 13, 2019 | 2 min read | 109 views |

Python coding challenges for interview preparation. You can follow the following article for solving python coding challenges.

1. Sequence of Differences in Python

Given a set of four numbers representing a “circular array” we can test to see if the absolute values of the differences between each adjoining element will eventually coalesce into a single value.

2. Find extra long factorials in python

Calculate and print the factorial of a given integer.

3. Find if credit card number is valid or not

You and Fredrick are good friends. Yesterday, Fredrick received credit cards from ABCD Bank. He wants to verify whether his credit card numbers are valid or not. You happen to be great at regex so he is asking for your help to find a valid credit card

4. Count the number of open lockers in school

A group of schools has a specific number of lockers and a specific number of students. All lockers are closed on the first day of school. As students get to school they begin to play with the lockers. The first student opens every locker. The second student begins with the 2nd locker and closes every other locker. The third student starts with the third locker and changes every 3rd locker. That is, the third student opens the locker if it is closed and closes it if it is open. The 4th student starts with locker 4 and changes every 4th locker and so on. After all the students are done, display how many lockers are open.

5. Pass the ball game: NxN matrix in python

Write a program to find out where Raj has to pass the ball or should he say "Over"

6. Write a program to find if a number is Lychrel Number in Python

Lychrel number is a natural number that cannot form a palindrome through the iterative process of repeatedly reversing its digits and adding the resulting numbers.

7. Write a program to check if the given word is Isogram & Pair isogram in python

An isogram is a logological term for a word or phrase without a repeating letter. It is also used by some people to mean a word or phrase in which each letter appears the same number of times, not necessarily just once.

8. Write a program for Hailstone Sequence in Python

A hailstone sequence is a calculation of numbers that increase and decrease but eventually settles into a repeating pattern of the numbers 4, 2, 1.

9. Write a python program to find Largest Substring that occurs more than once

You need to identify the largest substring that occurs more than once within a larger string

10. Spaced Out?

Given 3 different integer numbers, determine if the difference between the smallest number and the middle number is the same as the difference between the middle number and the largest number.

11. Find perfect abundant or deficient factors in python

Positive integers can be classified as abundant, deficient, or perfect. Abundant integers are those whose proper factors sum to a larger number.

##### Machine Learning

Data science, machine learning, python, R, big data, spark, the Jupyter notebook, and much more

Last updated 1 week ago

###### Recommended books for interview preparation:
Book you may be interested in..
##### ebook PDF - Cracking Spring Microservices Interviews for Java Developers
Book you may be interested in..
##### ebook PDF - Cracking Java Interviews v3.5 by Munish Chandel
Book you may be interested in..