Welcome! This repo contains two simple and educational Python tasks β perfect for beginners looking to practice basic input handling, dictionaries, list slicing, and reversing in Python. π
A console-based program that lets you enter a student's name and returns their marks from a predefined dictionary.
- Case-insensitive name matching
- Clean output formatting
- Graceful handling for unknown names
Enter the student's name: virat π€ Output Example:
Virat's marks: 30
This program demonstrates how to:
Generate a list from 1 to 10
Slice the first 5 elements
Reverse those sliced elements
Original list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] Extracted first five elements: [1, 2, 3, 4, 5] Reversed extracted elements: [5, 4, 3, 2, 1] π οΈ How to Run Make sure Python 3 is installed.
python task1.py
python task2.py
π§ Concepts Covered Python input() and string methods
Dictionary usage
Conditional logic
List slicing and reversing
π Contributing Contributions are welcome! Feel free to open an issue or PR if you want to improve the tasks or add new ones. π‘
π License This project is licensed under the MIT License.