Skip to content

Khanyi-Codes/Python-simple-test-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"""

Python For Loop Tests: Shapes and Counting

This test suite is designed to help you practice and improve your Python programming skills, particularly with loops, list comprehensions, and string manipulations. It contains 25 functions to implement, covering a range of difficulties from beginner to hard.

How to Use This Test Suite

  1. Implement the functions in a separate Python file (e.g., solutions.py).
  2. Copy the test class TestLoopsAndShapes into your test file (e.g., test_solutions.py).
  3. Run the tests using a test runner like pytest or by running python -m unittest test_solutions.py.

List of Functions to Implement

  1. count_items(items)
  2. sum_numbers(numbers)
  3. find_largest(numbers)
  4. count_even_numbers(numbers)
  5. sum_digits(number)
  6. count_vowels(string)
  7. multiply_list_elements(numbers)
  8. create_number_triangle(n)
  9. fibonacci_sequence(n)
  10. remove_vowels(string)
  11. create_multiplication_table(n)
  12. count_character_frequency(string)
  13. reverse_words(sentence)
  14. spiral_matrix(n)
  15. pascal_triangle(n)
  16. longest_common_subsequence(str1, str2)
  17. count_inversions(arr)
  18. create_hollow_square(n)
  19. create_diamond(n)
  20. create_hourglass(n)
  21. create_spiral_string(n)
  22. create_alphabet_diamond(n)
  23. create_number_spiral(n)
  24. create_pyramid(n)
  25. create_number_triangle(n)

Good luck, and happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages