Welcome to the python-questions-with-answers repository! This repository contains a collection of Python questions along with their respective answers. There are two files: one with the questions and the other with the answers.
-
Before checking the answers, we encourage you to try solving the questions on your own. This will give you an opportunity to practice your Python skills and problem-solving abilities.
-
Questions are listed in the python_test_questions.ipynb file. Each question is accompanied by a description, and you are expected to write Python functions to solve them.
-
Once you have attempted the questions, you can check your solutions against the provided answers in the python_test_answers.ipynb file.
Write a Python function that takes a string as input and returns the count of vowels (a, e, i, o, u) in the string. Ignore case sensitivity.
Given a list of integers, write a Python function to return a new list containing only the unique elements from the original list, preserving their order.
Write a Python function that checks if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequence of characters that reads the same backward as forward. (Example: "abba")
Write a Python function to determine if a given positive integer is a prime number. A prime number is only divisible by 1 and itself.
Implement a Python function to calculate the factorial of a given non-negative integer 'n'.
Write a Python function that takes two lists as input and returns a new list containing elements that appear in both lists, without any duplicates.
Implement a Python function that converts a CamelCase string to snake_case. For example, "CamelCaseString" should become "camel_case_string."
Feel free to explore and solve these Python questions to sharpen your programming skills. Happy coding!