Week 3 at Fellowship
I am currently surfing through week 3, and I got to know about something strange this week. I was truly shocked to me. Below are the…
Week 3 at Fellowship

I am currently surfing through week 3, and I got to know about something strange this week. I was truly shocked to me. Below are the updates given on my work in week 3. Read below to find out:
Task 1: Iterators and Generators:
Let’s go through one by one:
Iterators:
It is a Python object that allows the user to traverse through a collection one at a time. The collection can be Lists, Tuples, or dictionaries. The following are a few terminologies that I have learnt.
Iterable: An object that can be looped over like lists.
Iterator Protocol: The rules that govern the working of iterators by using __iter__() and __next__().
next() and iter(): Built-in functions to interact with iterators.
StopIteration: An exception, raised when there are no more items available.
Generators:
I first started programming in C, then in C++, and then in Python. And from the start, I always used a return statement, but I was amazed when I saw that there was no need to return the whole list when you only require 1 or 2 elements from it. It was truly a shock to me. I investigated and I found that:
A generator is a special type of iterator created using a function with the yield keyword. Instead of returning all at once, it produces one value at a time when requested. It pauses the execution between each yield and resumes where it left off when requested. Yield works on lazy evaluation, which means values are computed when requested, saving memory and computation. It is useful when working on a larger dataset to create values on the fly when required.
Project: Student Management System
I also worked on a Project, which included a Python-based Student Management System where students’ records (name, age, course, grades, etc.) are stored, retrieved, and manipulated. Tasks included the following sub-tasks:
Task 1: Object-Oriented Programming (OOP)
This task focused on using OOP principles to model a student management system. It involved creating a Student class to store and manage student data (e.g., name, age, student ID, courses). It also included another child class, Graduate Student, for specialized students with extra attributes. This task included creating a Student class with getters and setters and calculating GPA with a class method. A sub-class graduate Student was also created. This task strengthened encapsulation and inheritance concepts.
Task 2: File Handling
This task includes reading student records from a file and writing to another file. Tasks included were:
- Read and display student records from a file.
- Write student data to a new file.
- Handle exceptions (e.g., file not found, read/write errors).
- Count the total number of students in the file.
Task 3: Custom Python Package
These tasks included creating a reusable Python package with a module that handles student-related operations such as grade calculations, attendance tracking, and performance evaluation. The tasks were:
- Design a package with modules:
arithmetic.py,attendance.py, andperformance.py. - Implement functions like percentage calculation, attendance percentage, and performance evaluation.
- Create a main.py script to demonstrate package usage.
This task strengthened my ability to do modular Programming, package creation, and code organization for reusability.
Task 4: Iterators and Generators
This task applied iterators and generators to manage student data dynamically to retrieve values when required. The task demanded:
- Create an iterator
StudentListto traverse enrolled students. - Implement a generator
attendance_generatorfor daily attendance simulation. - Implement a generator
random_marks_generatorto yield random student marks.
Conclusion:
This week, there were many basic-level tasks like class operations and file operations, which served as a base for approaching complex tasks. There were also some intermediate-level tasks like sub-classing, package creation, and generator implementation that week, though in the start by I gradually got used to it. As the main focus was on a student management system that connected theoretical concepts to put in a use case, that gave me a peek at how a real-world problem looks.
메타데이터
- post_id
- fd86ceae924a
- slug
- week-3-at-fellowship-fd86ceae924a
- url
- https://medium.com/@myself.abdullahasif/week-3-at-fellowship-fd86ceae924a
- canonical_url
- https://medium.com/@myself.abdullahasif/week-3-at-fellowship-fd86ceae924a
- author_url
- https://medium.com/@myself.abdullahasif
- status
- ok
- fetched_at
- 2026-07-20 12:08:16