Skip to content

Ashwani114/Data-Structures-and-Strings-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Python Programs Collection

This repository contains two Python programs demonstrating basic programming concepts.

Programs

1. Student Marks Management (Task_1.py)

A program that manages student marks using a dictionary data structure.

Features:

  • Stores student names and their corresponding marks in a dictionary
  • Allows users to look up marks by entering a student's name
  • Provides appropriate feedback if the student is not found

How to Use:

  1. Run the program: python Task_1.py
  2. Enter a student's name when prompted
  3. The program will display:
    • The student's marks if found
    • A "not found" message if the student doesn't exist in the records

2. List Manipulation (Task_2.py)

A program that demonstrates various list operations in Python.

Features:

  • Creates a list of numbers from 1 to 10
  • Extracts the first five elements
  • Reverses the extracted elements
  • Displays both the extracted and reversed lists

How to Use:

  1. Run the program: python Task_2.py
  2. The program will automatically display:
    • The first five elements from the original list
    • The same five elements in reverse order

Technical Concepts Demonstrated

  • Dictionary operations
  • List creation and manipulation
  • List slicing
  • User input handling
  • String formatting (f-strings)
  • Conditional statements
  • Basic Python data structures

Requirements

  • Python 3.x

Running the Programs

# To run the student marks program
python Task_1.py

# To run the list manipulation program
python Task_2.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages