Assignment 1 PPL
Assignment 1 PPL
Sujal Pawar[SCOC50] S8 1
| Page
1. Research and create an interactive timeline of programming
languages.
Select 5–10 programming languages from different paradigms (e.g., C,
Python, Prolog, Haskell).
Include: Year of creation.
Paradigm(s) supported.
Key features and real-world applications.
Tools: Use tools like Canva, Visme, or Google Slides to create the
timeline.
Ans:
Sujal Pawar[SCOC50] S8 2
| Page
Recommendation
• Use VS Code for web development, JavaScript, and lightweight
2. coding.
• Use PyCharm for Python, AI/ML, and Django development.
• Use Eclipse for Java and enterprise applications.
Sujal Pawar[SCOC50] S8 3
| Page
Apply multiple programming paradigms to solve the same
problem.
Build a simple banking system with the following features:
Deposit and withdrawal.
Balance check.
Implement it in:
Procedural paradigm (e.g., C or Python).
Object-Oriented paradigm (e.g., Java or Python with OOP).
Compare the design and code of each. Prepare comparison table.
Ans:
Code:
def deposit(amount):
global balance
if amount > 0:
balance += amount
print(f"Deposited: ${amount}")
else:
Sujal Pawar[SCOC50] S8 4
| Page
print("Invalid deposit amount.")
def withdraw(amount):
global balance
3. if 0 < amount <= balance:
balance -= amount
print(f"Withdrawn: ${amount}")
else:
print("Invalid withdrawal amount or insufficient funds.")
def check_balance():
print(f"Current Balance: ${balance}")
# Example usage
deposit(100)
withdraw(40)
check_balance()
Code:
Sujal Pawar[SCOC50] S8 5
| Page
if 0 < amount <= self.balance:
self.balance -= amount
print(f"Withdrawn: ${amount}")
else:
print("Invalid withdrawal amount or insufficient funds.")
def check_balance(self):
print(f"Current Balance: ${self.balance}")
# Example usage
account = BankAccount()
account.deposit(100)
account.withdraw(40)
account.check_balance()
Sujal Pawar[SCOC50] S8 6
| Page