A small collection of practice scripts built while learning the Python basics. Each file focuses on a simple topic so you can run and experiment with them one by one.
- Install Python 3.
- Run any script with
python3 <file_name>from the project root. - Scripts with spaces in their names need quotes, for example
python3 "Branch structure.py".
helloworl.py: first "hello world" print.variable.py: integers, booleans, strings, floats, type conversion, and character codes.operators_demo.py: arithmetic, assignment, comparison, logical operations, and a Celsius-to-Fahrenheit calculation.Branch structure.py: conditional logic plus Heron's formula to validate triangle sides.Loop Structure.py:forloops, a number-guessingwhileloop, and a multiplication table.List.py: list creation, concatenation, mutation methods, enumeration, and a dice-roll counter using randomness.functions_and_collections.py: reusable functions, list comprehensions, dictionary updates, tuples, sets, and summary statistics.
- The guessing game and triangle check require user input in the terminal.
- Feel free to tweak the examples and re-run them to see how the output changes.