Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions assignment_1/quiz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Ridwan
# simple program about general question
name =input("what is your name?")
print("welcome!,", name,"let start question.\n")

score = 0
# question 1
print(" 1. what is 5 + 5")
answer1 = input("your answer:")

if answer1.lower() == "10":
print("correct! .\n")
score += 1
else:
print("in coorect answer is 10.\n")

# question 2
print("2.what is the capitat city of awdal region?")

answer2 = input("your answer:")

if answer2.lower() == "borama":
print("correct!.\n")
score += 1
else:
print("incorrect answer is borama. \n")

#question 3
print("how many years do you learn in university?")
answer3 = input("your answer is:")

if answer3.lower() == "4years":
print("correct!.\n")
score += 1
else:
print("incorrect answer is 4years.\n")

print("finished question")
print(name + ":your total score is", score, "out of3/3 ")

















1 change: 1 addition & 0 deletions assignment_2/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mohamed geele warfaa
52 changes: 52 additions & 0 deletions assignment_2/study_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Name: Ridwan Muuse (or your alias)
# Program: study_log.py
# Description: A simple study log program that lets the user add notes,
# view them, and save/load from a file.

def load_notes(path):
"""Load notes from a file. Return a list of lines."""
try:
with open(path, "r", encoding="utf-8") as file:
return [line.strip() for line in file]
except FileNotFoundError:
return []


def save_notes(path, notes):
"""Save notes to a file, one per line."""
with open(path, "w", encoding="utf-8") as file:
for note in notes:
file.write(note + "\n")


def main():
# Optional: ask user name
name = input("Enter your name: ")
print(f"Welcome, {name}! 📘")

notes = load_notes("notes.txt")

while True:
print("\n1) Add note 2) List 3) Quit")
choice = input("Pick: ")

if choice == "1":
note = input("Note: ")
notes.append(note)

elif choice == "2":
print("\nYour notes:")
for n in notes:
print(n)

elif choice == "3":
save_notes("notes.txt", notes)
print("Bye!")
break

else:
print("Invalid choice. Try 1, 2, or 3.")


if __name__ == "__main__":
main()
105 changes: 105 additions & 0 deletions assignment_3/catalog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Ridwan Muuse
# A simple personal movie catalog

from dataclasses import dataclass


@dataclass
class CatalogItem:
title: str
year: int

def __str__(self):
return f"{self.title} ({self.year})"


class Catalog:
def __init__(self):
self.items = []

def add_item(self, item):
self.items.append(item)

def list_all(self):
if not self.items:
print("Catalog is empty.")
else:
print("\nMovies in catalog:")
for item in self.items:
print(item)


def load_catalog(path, catalog):
try:
with open(path, "r", encoding="utf-8") as file:
for line in file:
line = line.strip()

if line:
parts = line.split("|")

if len(parts) == 2:
title = parts[0]
year = int(parts[1])

item = CatalogItem(title, year)
catalog.add_item(item)

except FileNotFoundError:
pass


def save_catalog(path, catalog):
with open(path, "w", encoding="utf-8") as file:
for item in catalog.items:
file.write(f"{item.title}|{item.year}\n")


def main():
path = "catalog.txt"

catalog = Catalog()
load_catalog(path, catalog)

while True:
print("\nPersonal Movie Catalog")
print("1) Add")
print("2) List")
print("3) Save")
print("4) Quit")

choice = input("Pick: ")

if choice == "1":
title = input("Title: ")

year_text = input("Year: ")

if year_text.isdigit():
year = int(year_text)

item = CatalogItem(title, year)
catalog.add_item(item)

print("Movie added.")
else:
print("Year must be a number.")

elif choice == "2":
catalog.list_all()

elif choice == "3":
save_catalog(path, catalog)
print("Catalog saved.")

elif choice == "4":
save_catalog(path, catalog)
print("Saved. Bye!")
break

else:
print("Invalid choice.")


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions assignment_3/catalog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
developer|2024
85 changes: 85 additions & 0 deletions finalproject/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Ebbir Payment System

## Overview

Ebbir Payment System waa mashruuc Python ah oo ku dayaya nidaam lacag-bixineed (mobile payment system). Isticmaaluhu wuxuu geli karaa akoonkiisa isagoo adeegsanaya USSD code, kadibna wuxuu maamuli karaa lacagtiisa.

Lacagta lagu isticmaalo mashruucan waa **Ethiopian Birr (ETB)**.

## Features

* User Login
* Check Balance
* Send Money
* Deposit Money
* Change Password
* Logout

## Technologies

* Python 3

## Default Accounts

| Username | Password | Balance (ETB) |
| -------- | -------- | ------------: |
| Ali | 1234 | 500.00 |
| Ahmed | 5678 | 200.00 |
| Ayan | 1111 | 800.00 |
| Hassan | 2222 | 1000.00 |
| Fatima | 3333 | 350.00 |

## How to Run

1. Ku rakib Python 3 haddii uusan ku jirin kombiyuutarkaaga.
2. Kaydi code-ka magaca `ebbir.py`.
3. Fur Terminal ama Command Prompt.
4. Tag galka uu ku jiro faylka.
5. Orod amarka:

```bash
python ebbir.py
```

Haddii aad isticmaasho Linux ama macOS:

```bash
python3 ebbir.py
```

## USSD Code

Marka barnaamijku bilaabmo geli:

```text
*841#
```

## Main Menu

1. Check Balance
2. Send Money
3. Deposit Money
4. Change Password
5. Exit

## Project Structure

```text
Ebbir-Payment-System/
├── ebbir.py
└── README.md

## Future Improvements

* Transaction History
* Withdraw Money
* Admin Dashboard
* Save Data to File or Database
* PIN Validation
* Account Registration

## Author : Ridwan Mouse Abdi

Name:https://github.com/RidwanMouse/Ebbirpeyment
1 change: 1 addition & 0 deletions python-for-everyone-bootcamp
Submodule python-for-everyone-bootcamp added at a7f7bb
1 change: 1 addition & 0 deletions submissions/RidwanMouse/finalProject
Submodule finalProject added at a5eb18
Loading