Python
Python copied to clipboard
All Algorithms implemented in Python
class BankAccount: def __init__(self,account_number,balance): self.__account_number = account_number self.balance = balance def check_balance(self): print("your account number is : ",self.__account_number) print("your available balance is :" ,self.balance) b = BankAccount(281207,27000) b.check_balance()
### What would you like to share? Hello wordld ### Additional information _No response_
#2number num1 = float(input("enter your first number:")) num2 = float(input("enter your second number:")) #operations print("1-Addition") print("2-suntract") print("3-multiply") print("4-devide") choice = int(input("enter your choice: ")) if choice == 1: print("Result:", num1+num2)...
### Describe your change: This updates the bubble_sort doctring to provide a clearer explanation of how bubble sort works. No functional changes were made. * [ ] Add an algorithm?...
Bugs
### Repository commit a0b0f41 ### Python version (python --version) Python 3.10.7 ### Dependencies version (pip freeze) Not applicable (this is a logical issue, not dependency-related) ### Expected behavior All methods...
### Feature description I want to make something for if someone’s gonna write a str instead of int in this input it needs to write “age is not valid” I’m...
### Describe your change: this PR focused purely in code quality and readability of the subset sum algorithm * [ ] Add an algorithm? * [] Fix a bug or...
### Describe your change: This pull request adds a heap-based implementation of the **Median in a Stream** problem. The algorithm maintains two heaps (a max heap and a min heap)...
### Describe your change: * [ ] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? --...
### Describe your change: * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? -- Note:...