Python / Modules and Packages

Recent solutions:

Check these solutions from our community:
Python / Modules and Packages DifficultyMedium Python
This technical problem asks the reader to write a Python function that will sum all of the integers in a given list. An example input and output are provided.
About this solution: This solution correctly sums a list of integers. However, it is not very robust - for example, it would not work if the input was not a list of integers. Additionally, the function does not have any documentation to explain what it does or how to use it.
Jan 30
Python / Modules and Packages DifficultyMedium Python
This Python function takes a list of integers as input and returns the largest number in the list.
About this solution: The candidate's solution correctly finds the largest number in the list. The candidate could have used the built-in max() function to find the largest number in the list.
Jan 28
Python / Modules and Packages DifficultyMedium Python
This technical problem asks the user to write a Python function to check if a given string is a pangram or not. A pangram is a word or sentence containing every letter of the alphabet at least once. For example, "The quick brown fox jumps over the lazy dog" is a pangram.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The approach is clear and efficient.
Nov 25
Python / Modules and Packages DifficultyMedium Python
This Python function checks if a string is a pangram, which is a word or sentence containing every letter of the alphabet at least once.
About this solution: The candidate's solution is correct and demonstrates a level of completeness. The candidate's approach is also efficient, using a single loop to check if every letter of the alphabet is in the sentence.
Nov 22
Python / Modules and Packages DifficultyMedium Python
This problem asks the user to write a function that takes in a list of integers and returns the sum of the integers that are divisible by 3. An example input and output are given.
About this solution: The candidate's solution correctly solves the problem. They iterate through the list and add the numbers divisible by 3 to a sum variable. They then return the sum variable. This is a solid solution that is easy to understand.
Nov 21
Python / Modules and Packages DifficultyMedium Python
This Python function calculates the sum of the even numbers in a given list.
About this solution: This solution correctly finds the sum of all even numbers in the given list. The approach is straightforward and easy to follow. Well done!
Nov 18
Python / Modules and Packages DifficultyMedium Python
This Python function finds the largest number in a list of integers. For example, given the input list [1, 2, 3, 4, 5], the function would return 5.
About this solution: The candidate's solution correctly finds the largest number in the list. The candidate could have used the built-in max() function to find the largest number in the list.
Nov 09