Data Structures & Algorithms
2021
2021
Description
Questions were given to improve our proficiency in Python as well as discover new modules and functions that could aid us in solving difficult coding interview questions
Phone Number to Letter
From left to right
Print all possible combinations of an 8 digit phone number
24 Hour Clock
Quiz Program
Create a quiz program using a csv file provided
Steps:
Randomise questions and answer choices
Show Correct answer if Wrong answer is picked
Randomly choose out of 3 congratulatory phrases if correct
Show score at the end of the Quiz
CSV file details:
Each question has 4 answers
1st option is always correct
Top 10 Words from Text
Find Top 10 most frequent words in text file
Steps:
Remove stopwords provided
Remove punctuations
Quiz Program
Players determine size of the board (maximum 9x9)
If the board has an odd number of cells, the last cell is designated as an unused cell
An unused cell is shown with "@", the rest are shown as "?"
The game board has randomly generated pairs of letters
Players take turn to pick two cells
Show the letter of the cell when picked
If the player choses two non-matching letters, letters are hidden again and next player plays
If the player chooses two matching letters, letters stay visible and same player picks again
If the player gives an invalid cell (unused/outside the board), he loses the turn
When all cells are opened, the game is over
Show scores and winner(s)