livepython.net

Python Interview Pack

These are the small coding tasks that interviews ask again and again. Start with the warm-up. Each phase builds on the one before it.

40 questions in 3 phases · Learn first: chapters 8 to 15 of the course

0 of 40 solved

1Warm-up

Short tasks with one idea each. Every question gives you the steps.

  1. 1Python Program to Play FizzBuzz from 1 to N#190
  2. 2Python Program to Reverse a String#191
  3. 3Python Program to Reverse the Digits of a Number#192
  4. 4Python Program to Find the Factorial of a Number#193
  5. 5Python Program to Print the Fibonacci Series up to N Terms#194
  6. 6Python Program to Check If a Number Is an Armstrong Number#195
  7. 7Python Program to Check If a Number Is a Perfect Number#196
  8. 8Python Program to Count Uppercase, Lowercase, Digits and Spaces#197
  9. 9Python Program to Check If Two Words Are Anagrams#198
  10. 10Python Program to Check If a Sentence Is a Pangram#199
  11. 11Python Program to Remove Duplicates from a List and Keep the Order#200
  12. 12Python Program to Count How Many Times a Number Appears in a List#201
  13. 13Python Program to Count Positive, Negative and Zero Numbers in a List#202
  14. 14Python Program to Check If a List Is Sorted#203

2Practice

Classic interview tasks on lists and strings. Use the hints if you get stuck.

  1. 15Python Program to Find the Second Largest Number in a List#204
  2. 16Python Program to Find the Missing Number from 1 to N#205
  3. 17Python Program to Find the Numbers That Appear More Than Once#206
  4. 18Python Program to Find the Most Common Character in a String#207
  5. 19Python Program to Remove Repeated Characters from a String#208
  6. 20Python Program to Check If a Sentence Is a Palindrome Ignoring Spaces#209
  7. 21Python Program to Find the Longest Word in a Sentence#210
  8. 22Python Program to Count How Often Each Word Appears#211
  9. 23Python Program to Merge Two Sorted Lists Without sort()#212
  10. 24Python Program to Rotate a List by K Places#213
  11. 25Python Program to Find the Items Two Lists Have in Common#214
  12. 26Python Program to Find Two Numbers That Add Up to a Target#215
  13. 27Python Program to Compress a String with Letter Counts#216
  14. 28Python Program to Move All Zeros to the End of a List#217

3Challenge

Harder tasks that mix many ideas. Take your time.

  1. 29Python Program to Check If Brackets Are Balanced#218
  2. 30Python Program to Find the First Character That Does Not Repeat#219
  3. 31Python Program to Group Words That Are Anagrams#220
  4. 32Python Program to Find the Longest Part Without Repeated Letters#221
  5. 33Python Program to Find the Largest Sum of a Run of Numbers#222
  6. 34Python Program to Convert a Number to Roman Numerals#223
  7. 35Python Program to Convert Roman Numerals to a Number#224
  8. 36Python Program to Find a Number with Binary Search#225
  9. 37Python Program to Sort a List with Bubble Sort#226
  10. 38Python Program to Transpose a Matrix#227
  11. 39Python Program to Find the Longest Common Start of Words#228
  12. 40Python Program to Hide a Message with a Caesar Cipher#229