Projetos
Ver no GitHub
DairHX/Python_Basics_Exercises
Sobre
đ A series of beginner to advanced Python basics exercises with solutions to help you learn and practice the fundamentals of Python programming.
Aprendizado e educaçãoCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- 0
- em 1 mĂȘs
- Coletando histĂłrico
VariaçÔes lĂquidas em perĂodos sobrepostos, nĂŁo totais diĂĄrios. MediçÔes ausentes ficam em branco. Estrelas indicam interesse, nĂŁo qualidade.
README.md
Originalđ§ Python PracticeâŻExercises
A progressive set of handsâon challengesâsimple â intermediate â advancedâto sharpen your Python fundamentals before Python_For Pentesters_Basics and beyond.
â Simple Exercises
| # | Exercise | Goal / Instructions |
|---|---|---|
| 1 | Calculate the Factorial of a Number | Ask the user for a positive integer â use a loop to compute n! â return & print the result. |
| 2 | Sum of Digits of a Number | Ask for an integer â treat it as a string â loop & sum the digits â print the total. |
| 3 | Find the Minimum and Maximum in a List | Ask for a list â use min() / max() â display both values. |
| 4 | Average of Several Numbers | Ask for numbers â compute sum / len â print the average. |
| 5 | Generate a Multiplication Table | Ask for a base number & limit â loop and print n Ă i for each i. |
| 6 | Solve a FirstâDegree Equation (ax + b = 0) | Ask for a, b â if a â 0, solve x = âb/a; else decide no / infinite solutions. |
| 7 | Sum of Squares in a List | Ask for a list â square each â sum & print. |
| 8 | Average of Even Numbers in a List | Ask for a list â filter evens â average them or report none. |
| 9 | Check if a List is Increasing | Verify each element is †the next â print whether ascending. |
âïž Intermediate Exercises
| # | Exercise | Goal / Instructions |
|---|---|---|
| 10 | Find Prime Numbers in a List | Write is_prime() â apply to the list â display primes. |
| 11 | Find Multiples in a Range | Given n, a, b â loop aâŠb â collect numbers divisible by n. |
| 12 | Calculate the GCD (Euclidâs Algorithm) | Ask for two integers â use Euclidâs method â print the GCD. |
| 13 | Generate Fibonacci Sequence | Ask for n â loop to build the sequence â print it. |
| 14 | Find Perfect Numbers in a List | Sum proper divisors â keep numbers equal to that sum â display them. |
| 15 | Celsius ââŻFahrenheit Converter | Ask conversion direction â apply CâŻââŻF or FâŻââŻC formula â print result. |
đŹ Advanced Exercises
| # | Exercise | Goal / Instructions |
|---|---|---|
| 16 | Implement Selection Sort | Repeatedly find the smallest element & move it front using list.remove() â print sorted list. |
| 17 | Check if a String is a Palindrome | Ignore spaces / punctuation / case â state if itâs a palindrome. |
| 18 | Solve a Quadratic Equation | Ask for a, b, c â compute Î = bÂČ â 4ac â output real or complex roots. |
How to Run
# clone the repo
git clone https://github.com/your-username/python_practice.git
cd python_practice
# run any exercise
python simple_exercises/ex01_factorial.py
Explore projetos relacionados
CarregandoâŠ