Workshop
Exercise 24: Check for a Pangram
- Problem: Write a function
is_pangram(s)that checks whether a given stringsis a pangram (contains every letter of the alphabet at least once). - Expected Output:
python
is_pangram("The quick brown fox jumps over the lazy dog")
# Output: True
Exercise 25: Find the Second Largest Element
- Problem: Write a function
second_largest(lst)that returns the second largest element in a list of integers. - Expected Output:
python
second_largest([10, 20, 4, 45, 99])
# Output: 45
Exercise 20: Generate a List of Primes
- Problem: Write a function
generate_primes(n)that returns a list of prime numbers up ton. -
Expected Output:
python
generate_primes(10)
# Output: [2, 3, 5, 7] - Refer Here for notebook used in class
