Skip to content

priyanshu5556/Mini-Project-in-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Mini-Project-in-Python

Bike rentel project class bikeShop:

def __init__(self,stock):
    self.stock=stock
def displayBike(self):
    print("Total Bikes",self.stock)
def rentForBike(self,q):
    if q<0:
        print("Enter the positive value or greater than zero")
    elif q>self.stock:
        print("Enter the value (less then stock)") 
    else:
        self.stock=self.stock-q
        print("Total Prices",q*100)
        print("Total Bikes",self.stock)

while True: obj=bikeShop(100) uc=int(input(''' 1 Display Stocks 2 Rent a Bike 3 Exit
''')) if uc==1: obj.displayBike() elif uc==2: n=int(input("Enter The Qty:---")) obj.rentForBike(n) else: break

About

Bike rentel project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published