Skip to content

Anshulkavi/Python1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Python Tasks: Student Lookup & List Operations

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. πŸš€


πŸ“Œ Task 1: πŸ” Student Marks Lookup

A console-based program that lets you enter a student's name and returns their marks from a predefined dictionary.

πŸ’‘ Features:

  • Case-insensitive name matching
  • Clean output formatting
  • Graceful handling for unknown names

πŸ“₯ Input Example:

Enter the student's name: virat πŸ“€ Output Example:

Virat's marks: 30

πŸ“Œ Task 2: πŸ” List Slicing & Reversing

This program demonstrates how to:

Generate a list from 1 to 10

Slice the first 5 elements

Reverse those sliced elements

πŸ“€ Sample Output:

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.

Run Task 1

python task1.py

Run Task 2

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages