Ecosyste.ms: Repos
An open API service providing repository metadata for many open source software ecosystems.
GitHub / borislavstoychev / Soft_Uni
Python
JSON API: https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borislavstoychev%2FSoft_Uni
Stars: 1
Forks: 0
Open Issues: 0
License: None
Language: Python
Repo Size: 3.59 MB
Dependencies:
568
Created: almost 4 years ago
Updated: almost 3 years ago
Last pushed: almost 3 years ago
Last synced: 28 days ago
Files
Loading...
Readme
Loading...
Dependencies
- 4.Gym *
- ClassCustomer *
- ClassEquipment *
- ClassExercisePlan *
- ClassGym *
- ClassSubscription *
- ClassTrainer *
- Createastaticmethodcalledget_next_idwhichreturnstheidthatwillbegiventothenextcustomer *
- Createastaticmethodcalledget_next_idwhichreturnstheidthatwillbegiventothenextequipment *
- Createastaticmethodcalledget_next_idwhichreturnstheidthatwillbegiventothenextsubscription *
- Createastaticmethodcalledget_next_idwhichreturnstheidthatwillbegiventothenexttrainer *
- Createthefollowingmethods *
- Createthefollowingprojectstructure *
- Customer <1>John
- Equipment <1>Treadmill
- Examples *
- Implementthe__repr__methodsoitreturnstheinfoaboutthecustomerinthefollowingformat *
- Implementthe__repr__methodsoitreturnstheinfoabouttheequipmentinthefollowingformat *
- Implementthe__repr__methodsoitreturnstheinfoaboutthesubscriptioninthefollowingformat *
- Implementthe__repr__methodsoitreturnstheinfoaboutthetrainerinthefollowingformat *
- Output *
- Plan <1>withduration20minutes
- Subscription <1>on14.05.2020
- TestCode *
- Trainer <1>Peter
- Uponinitializationeachcustomerwillreceivethefollowingparameters *
- Uponinitializationtheclasswillnotreceiveanyparameters.However ,itshouldhavethefollowingattributes
- Uponinitializationtheclasswillreceivethefollowingparameters *
- customer =Customer
- equipment =Equipment
- fromproject.customerimportCustomer *
- fromproject.equipmentimportEquipment *
- fromproject.exercise_planimportExercisePlan *
- fromproject.gymimportGym *
- fromproject.subscriptionimportSubscription *
- fromproject.trainerimportTrainer *
- gym =Gym
- gym.add_customer *
- gym.add_equipment *
- gym.add_plan *
- gym.add_subscription *
- gym.add_trainer *
- plan =ExercisePlan
- print *
- subscription =Subscription
- trainer =Trainer
- 2.MovieWorld *
- AnnahassuccessfullyrentedBlackWidow *
- ClassCustomer *
- ClassDVD *
- ClassMovieWorld *
- Createonemoremethodcalledfrom_date *
- Createthefollowingprojectstructure *
- Examples *
- Implementthe__repr__method ,soitreturnsthefollowingstring
- Implementthe__repr__methodsoitreturnsthefollowingstring *
- JohnhassuccessfullyrentedTheCroods2 *
- Johnshouldbeatleast18torentthismovie *
- Output *
- TestCode *
- TheCustomerclassshouldreceivethefollowingparametersuponinitialization *
- TheDVDclassshouldreceivethefollowingparametersuponinitialization *
- TheMovieWorldclassshouldreceivetheoneparameteruponinitialization *
- c1 =Customer
- c2 =Customer
- d1 =DVD
- d2 =DVD.from_date
- fromproject.customerimportCustomer *
- fromproject.dvdimportDVD *
- fromproject.movie_worldimportMovieWorld *
- movie_world =MovieWorld
- movie_world.add_customer *
- movie_world.add_dvd *
- print *
- 4.HotelRooms *
- Examples *
- Freerooms *
- Hotel *
- Hotel5starsHotelhas3totalguests *
- Inafoldercalledprojectcreatetwofiles *
- Inthehotel.pyfilecreateaclasscalledHotel.Uponinitializationitshouldreceiveaname *
- Intheroom.pyfilecreateaclasscalledRoom.Uponinitializationitshouldreceiveanumber *
- Output *
- Takenrooms *
- TestCode *
- first_room =Room
- fromproject.hotelimportHotel *
- fromproject.roomimportRoom *
- hotel =Hotel.from_stars
- hotel.add_room *
- hotel.print_status *
- hotel.take_room *
- second_room =Room
- third_room =Room
- 1.Store *
- 14 *
- 19 *
- 1jeansremovedfromthestore *
- 2.Integer *
- 3.Calculator *
- 30 *
- 50.0 *
- 70 *
- Cannotremove1tomatoes *
- CreateaclasscalledCalculatorthathasthefollowingstaticmethods *
- CreateaclasscalledInteger.Uponinitializationitshouldreceiveasingleparametervalue *
- CreateaclasscalledStore.Uponinitializationitshouldreceiveaname *
- Examples *
- FirststoreoftypeFruitandVegwithcapacity20 *
- Lab *
- Output *
- Problemsforin-classlabforthePythonOOPCourse *
- SecondstoreoftypeClotheswithcapacity250 *
- TestCode *
- first_num =Integer
- first_store =Store
- jeansaddedtothestore *
- potatoaddedtothestore *
- print *
- second_num =Integer.from_roman
- second_store =Store.from_size
- valueisnotafloat *
- wrongtype *
- 12 ,Peter,
- 12 ,George,
- 7.Library *
- ClassLibrary *
- ClassUser *
- CreateclasscalledLibrary ,wheretheinformationregardingtheusersandbooksrented
- Georgedoesn *
- Note *
- Output *
- Pleasecheckagaintheprovidedusername-itshouldbedifferentthantheusernameusedsofar *
- TestCode *
- Thebook *
- Thereisnouserwithid =2
- Uponinitializationitshouldreceiveuser_id *
- Uponinitializationyouwon *
- Usernamesuccessfullychangedto *
- Userwithid =12alreadyregisteredinthelibrary
- Wecouldnotfindsuchusertoremove *
- Youshouldalsocreate3instancemethods *
- fromlibraryimportLibrary *
- fromproject.libraryimportLibrary *
- fromproject.userimportUser *
- fromuserimportUser *
- library =Library
- library.add_user *
- library.books_available.update *
- library.remove_user *
- print *
- user =User
- user.get_book *
- user.return_book *
- 00 *
- 09 *
- 1.Point *
- 1000 *
- 11 *
- 1500 *
- 18000 *
- 2.Circle *
- 3.Account *
- 4.Employee *
- 452.16 *
- 5.Time *
- 500 *
- 6.PizzaDelivery *
- 7.615773105863909 *
- 75.36 *
- Amountexceededbalance *
- CreateaclasscalledAccount.Uponinitializationitshouldreceiveid *
- CreateaclasscalledCircle.Uponinitializationitshouldreceivearadius *
- CreateaclasscalledPizzaDelivery.Uponinitializationitshouldreceivename *
- CreateaclasscalledPoint.Uponinitializationitshouldreceivexandy *
- CreateaclasscalledTime.Uponinitialization ,itshouldreceivehours,minutesandseconds
- CreateclassEmployee.Uponinitialization ,itshouldreceiveid
- Examples *
- Exercise *
- JohnSmith *
- Output *
- PizzaMargaritaalreadypreparedandwecan *
- Pleasecheckagainthedesiredquantityoftomatoes *
- TestCode *
- Theareashouldberoundedtothe2nddecimal. *
- UserGeorgewithaccount1234has0balance *
- UserPeterwithaccount5411256has500balance *
- Wrongingredientselected *
- You *
- account =Account
- circle =Circle
- circle.set_radius *
- employee =Employee
- margarita =PizzaDelivery
- margarita.add_extra *
- margarita.remove_ingredient *
- p.set_x *
- p.set_y *
- print *
- time =Time
- 1.Smartphone *
- 2.Vet *
- 3.Glass *
- 50mlleft *
- Bobbyregisteredintheclinic *
- Cannotadd200ml *
- Coryregisteredintheclinic *
- Coryunregisteredsuccessfully *
- CreateaclasscalledGlass.Uponinitializationitwillnotreceiveanyparameters ,youmustcreatehoweveraninstanceattributecalledcontentwhichshouldbeequalto0.Youshouldalsocreateaclassattributecalledcapacitywhichshouldbe250ml.Create3moreinstancemethods
- CreateaclasscalledSmartphone.Uponinitializationitshouldreceiveamemory *
- CreateaclasscalledVet.Uponinitializationitshouldreceiveaname *
- Examples *
- Fishyregisteredintheclinic *
- Georgehas1animals.1spaceleftinclinic *
- Glassfilledwith100ml *
- Glassfilledwith200ml *
- Glassisnowempty *
- InstallingFacebook *
- InstallingMessenger *
- Kayregisteredintheclinic *
- Lab *
- Mollynotintheclinic *
- NotenoughmemorytoinstallInstagram *
- Output *
- Peterhas3animals.1spaceleftinclinic *
- Silkyregisteredintheclinic *
- TestCode *
- Tomregisteredintheclinic *
- Tomunregisteredsuccessfully *
- Totalapps *
- TurnonyourphonetoinstallFacebook *
- george =Vet
- glass =Glass
- peter =Vet
- print *
- smartphone =Smartphone
- smartphone.power *
- 1.Person *
- 100 *
- 2.EmailValidator *
- 3.Mammal *
- 32 *
- 4.Account *
- 8827312 *
- CreateaclasscalledAccount.Uponinitializationitshouldreceiveanid ,balanceandpin
- CreateaclasscalledEmailValidator.Uponinitializationitshouldreceivemin_length *
- CreateaclasscalledMammal.Uponinitializationitshouldreceiveaname ,typeandsound.Createprivateclassattributecalledkingdomandsetittobe
- CreateaclasscalledPerson.Uponinitializationitshouldreceivenameandage.Createprivatenameandageattributes *
- Createonepublicmethod *
- DogisoftypeDomestic *
- DogmakesBark *
- Examples *
- False *
- George *
- Lab *
- Output *
- Pinchanged *
- TestCode *
- True *
- Wrongpin *
- account =Account
- animals *
- domains =
- email_validator =EmailValidator
- mails =
- mammal =Mammal
- person =Person
- print *
- 28.05.2020 *
- 9.TodoList *
- Cleared0tasks. *
- Don *
- Examples *
- GotoUniversity *
- Name *
- Output *
- SectionDailytasks *
- TaskName *
- TestCode *
- TheSectionclassshouldalsohavefourmethods *
- TheSectionclassshouldreceiveaname *
- TheTaskclassshouldalsohavefivemethods *
- Youaretaskedtocreatetwoclasses *
- print *
- second_task =Task
- section =Section
- section.add_task *
- task =Task
- task.add_comment *
- 2.PizzaCalories *
- Attributes *
- ClassDough *
- ClassPizza *
- ClassToppings *
- GettersandSetterstoalloftheprivateattributes *
- Methods *
- Privateattributebaking_technique *
- Privateattributedough *
- Privateattributeflour_type *
- Privateattributename *
- Privateattributetopping_type *
- Privateattributetoppings *
- Privateattributetoppings_capacity *
- Privateattributeweight *
- Submitinjudgeazipfilenamedproject ,containingaseparatefileforeachoftheclasses.
- add_topping *
- calculate_total_weight *
- 1.WildCatZoo *
- Adamfiredsuccessfully *
- AdamtheKeeperhiredsuccessfully *
- AnnatheKeeperhiredsuccessfully *
- Attributes *
- BilltheCaretakerhiredsuccessfully *
- CheetiatheCheetahaddedtothezoo *
- CheetotheCheetahaddedtothezoo *
- ClassCaretaker *
- ClassCheetah *
- ClassKeeper *
- ClassLion *
- ClassTiger *
- ClassVet *
- ClassZoo *
- Examples *
- Inthisexercisewearegoingtocreateawholeprojectcalled *
- JohntheKeeperhiredsuccessfully *
- KaseytheVethiredsuccessfully *
- MarietheCaretakerhiredsuccessfully *
- Methods *
- Name *
- Notenoughspaceforanimal *
- Notenoughspaceforworker *
- Output *
- PetertheVethiredsuccessfully *
- Pleasecreateseparatefileforeachclassasshownaboveandsubmitazipfilecontainingallfiles *
- Privateattributeanimal_capacity *
- Privateattributebudget *
- Privateattributeworkers_capacity *
- Publicattributeage *
- Publicattributeanimals *
- Publicattributegender *
- Publicattributename *
- Publicattributesalary *
- Publicattributeworkers *
- SimbatheLionaddedtothezoo *
- StacytheCaretakerhiredsuccessfully *
- TestCode *
- TigeriatheTigeraddedtothezoo *
- Youhave *
- Youhave5animals *
- Youhave7workers *
- Youpayedyourworkers.Theyarehappy.Budgetleft *
- Youtendedalltheanimals.Theyarehappy.Budgetleft *
- ZubatheTigeraddedtothezoo *
- add_animal *
- animal =animals
- animals =
- animals_status *
- fire_worker *
- foriinrange *
- forworkerinworkers *
- get_needs *
- hire_worker *
- pay_workers *
- price =prices
- prices =
- print *
- profit *
- tend_animals *
- workers =
- workers_status *
- zoo =Zoo
- 0.0 *
- 1.25 *
- 150 *
- 50 *
- Car *
- CreateabaseclassVehicle.Itshouldcontainthefollowingattributes *
- Createthefollowinghierarchywiththefollowingclasses *
- Output *
- Problem4.NeedforSpeed *
- TestCode *
- Theclassshouldhavethefollowingmethods *
- ThedefaultfuelconsumptionforVehicleis1.25.Someoftheclasseshavedifferentdefaultfuelconsumption *
- andsubmitinjudgeazipfile ,containingaseparatefileforeachoftheclassesusingthestructureshownbelow
- family_car =FamilyCar
- family_car.drive *
- print *
- vehicle =Vehicle
- vehicle.drive *
- 25 *
- CreateaChildclassthatinheritsPersonandhasthesameconstructordefinition.However ,donotcopythecodefromthePersonclass
- Output *
- Person *
- Peter *
- Problem1.Person *
- Submitinjudgeazipfilenamedproject ,containingaseparatefileforeachoftheclasses.
- TestCode *
- Youareaskedtomodelanapplicationforstoringdataaboutpeople.YoushouldbeabletohaveaPersonandaChild.Thechildderivesfromtheperson.Everypersonhaspublicattributesnameandage.Yourtaskistomodeltheapplication. *
- child =Child
- person =Person
- print *
- CreateaclassHero.Itshouldcontainthefollowingattributes *
- EoftypeElfhaslevel4 *
- Hero *
- HoftypeHerohaslevel4 *
- Output *
- Overridethe__repr__ *
- Problem3.PlayersandMonsters *
- TestCode *
- Yourtaskistocreatethefollowinggamehierarchy *
- andsubmitinjudgeazipfile ,containingaseparatefileforeachoftheclassesusingthestructureshownbelow
- elf =Elf
- hero =Hero
- print *
- 2.5 *
- 230 *
- 50 *
- 9.90 *
- ACakemusthavethefollowingattributesuponinitialization *
- ASalmonshouldhavethefollowingattributesuponinitialization *
- Beverage *
- BeverageandFoodclassesareproducts. *
- CoffeeandTeaarehotbeveragesandtheyacceptthefollowingparametersuponinitialization *
- Createagetterfortheattributecalories. *
- Createarestaurantwiththefollowingclassesandhierarchy *
- Dessertshouldacceptonemoreparameterinitsconstructor *
- HotBeverageandColdBeveragearebeveragesandtheyacceptthefollowingparametersuponinitialization *
- MainDish ,DessertandStarterarefood.Theyallacceptthefollowingparametersuponinitialization
- MakeSalmon ,SoupandCakeinheritMainDish,StarterandDessertclassesrespectively.
- Note *
- Output *
- Problem5.Restaurant *
- Product *
- Soup *
- Starter *
- TestCode *
- TheBeverageclassshouldhavethefollowingattributesandsubsequentgetters *
- TheCoffeeclassshouldhavethefollowingadditionalattributesandsubsequentgetters *
- TheFoodclassshouldhavethefollowingattributesandsubsequentgetters *
- TheProductclassshouldhavethefollowingattributesandsubsequentgetters *
- andsubmitinjudgeazipfile ,containingaseparatefileforeachoftheclassesusingthestructureshownbelow
- beverage =Beverage
- coffee *
- fishsoup *
- name ,price,milliliters
- print *
- product =Product
- soup =Soup
- 3.HierarchicalInheritance *
- Animalwithasinglepublicmethodeat *
- Catwithasinglepublicmethodmeow *
- DogandCatshouldinheritfromAnimal. *
- Dogwithasinglepublicmethodbark *
- Inafoldercalledprojectcreatethreefiles *
- Ineachfilecreateitscorrespondingclass-Animal ,DogandCat.
- SubmitinJudgeazipfileofthefolderproject. *
- 2.MultipleInheritance *
- Employeewithasinglepublicmethodget_fired *
- Inafoldercalledprojectcreatethreefiles *
- Ineachfilecreateitscorrespondingclass-Person ,EmployeeandTeacher.
- Personwithasinglepublicmethodsleep *
- SubmitinJudgeazipfileofthefolderproject. *
- TeachershouldinheritfromPersonandEmployee. *
- Teacherwithasinglepublicmethodteach *
- 5.Animals *
- Submitinjudgeazipfilenamedproject ,containingaseparatefileforeachoftheclasses.
- TheAnimalclass *
- TheCatclassshouldinheritandimplementtheAnimalclass.Herreprshouldreturn *
- TheDogclassshouldinheritandimplementtheAnimalclass.Hisreprshouldreturn *
- TheKittenclassshouldinheritandimplementtheCatclass.Thekittenshouldnotaccept *
- TheTomcatclassshouldinheritandimplementtheCatclass.Thetomcatshouldnotaccept *
- Yourtaskistocreateaclasshierarchylikethedescribedbelow. *
- 1.Vehicle *
- 12.299999999999997 *
- 17.0 *
- 2.299999999999997 *
- 2.Groups *
- 20 *
- 3.Account *
- 30 *
- 40 *
- 64.5 *
- Account *
- Accountofbob *
- Accountofbobwithstartingamount *
- CreateaclasscalledPerson.Uponinitializationitwillreceiveaname *
- CreateanabstractclasscalledVehiclethatshouldhaveabstractmethodsdriveandrefuel.Create2vehiclesthatinherittheVehicleclass *
- CreateasingleclasscalledAccount.Uponinitialization ,itshouldreceiveowner
- Examples *
- Exercise *
- False *
- GroupSpecialwithmembersElonMusk ,WarrenMusk
- Implementthecorrectmagicmethods ,sothecodeintheexamplebellowworksproperly
- Note *
- Output *
- Person0 *
- Person1 *
- Person2 *
- Person3 *
- Person4 *
- TestCode *
- True *
- acc =Account
- acc.add_transaction *
- acc2 =Account
- acc2.add_transaction *
- acc3 =acc
- car =Car
- car.drive *
- car.refuel *
- first_group =Group
- forpersoninthird_group *
- fortransactioninacc *
- p0 =Person
- p1 =Person
- p2 =Person
- p3 =Person
- p4 =p2
- print *
- second_group =Group
- third_group =first_group
- truck =Truck
- truck.drive *
- truck.refuel *
- 1.Execute *
- 1.ImageArea *
- 2.Instruments *
- 200 *
- 3.Shapes *
- 31.41592653589793 *
- 60 *
- 78.53981633974483 *
- Bye ,Peter
- CreateaclasscalledImageAreawhichwillstorethewidthandtheheightofanimage.Createamethodcalledget_area *
- Createafunctioncalledexecutethatreceivesafunctionasfirstargumentandthenalltheotherarguments *
- Createafunctioncalledplay_instrumentwhichwillreceiveaninstanceofaninstrumentandwillprintit *
- CreateanabstractclassShapewithabstractmethodscalculate_areaandcalculate_perimeter *
- CreateclassesCircle *
- Examples *
- False *
- Hello ,Peter,IamGeorge
- Lab *
- Output *
- Returntheresultoftheexecutionofthepassedfunctionwiththatarguments *
- Submitalltheclassesandyourimportsinthejudgesystem *
- Submitonlytheexecutefunctioninthejudgesystem *
- Submitonlytheplay_instrumentfunctioninthejudgesystem *
- TestCode *
- ThefieldsofCircleandRectangleshouldbeprivate *
- True *
- a1 =ImageArea
- a2 =ImageArea
- a3 =ImageArea
- circle =Circle
- classGuitar *
- classPiano *
- defplay *
- defsay_bye *
- defsay_hello *
- execute *
- guitar =Guitar
- piano =Piano
- play_instrument *
- playingtheguitar *
- playingthepiano *
- print *
- rectangle =Rectangle
- pyfiglet ==0.8.post1