Question: Please program like begginer! copypaste solutions from chat gpt are no welcome . Task 1 . 1 . Define a class Car with attributes make,

Please program like begginer! copypaste solutions from chat gpt are no welcome.
Task 1.1. Define a class Car with attributes make, model, year_of_production and mileage .
Add a method print that will print all the attributes of the car.
Create an object of the class Car with arbitrary attribute values and call the method print.
Add a new method age that will print how old the car is in years, get the current year using the datetime module.
Task 2.2. Define a class Calculator with attributes a and b. Add methods add, subtract, multiply, divide , exponent, and root that will perform the corresponding operations on the attributes a and b.
Task 3.3. Definirajte klasu Student s atributima ime, prezime, godine i ocjene.
Iterirajte kroz sljedeu listu studenata i za svakog studenta stvorite objekt klase Student i dodajte ga u novu listu studenti_objekti :
```
studenti =[
{"ime": "Ivan", "prezime": "Ivic", "godise": 19, "ocjene": {5,4,3,5,2}},
{"ime": "Marko", "prezime": "Markovic", "godine": 22, "ocjene": {3,4,5,2,3}},
f"ime"; "Ana", "preaime"; "Ani6", "godine"; 21, "ocjene"; [5,5,5,5,51},
{"ime"; "Petra", "prezime"; "Petri6", "godine": 13, "cojene"; [2,3,2,4,31},
f"ime": "Iva", "preaime": "Ivie", "godine": 17, "ocjene": {4,4,4,3,51},
f"ime": "Mate", "prezime": "Matic", "godine": 18, "ocjese": {5,5,5,5,51}
l
```
Dodajte metodu prosjek koja e raunati prosjenu ocjenu studenta.
U varijablu najbolji_student pohranite studenta s najveim prosjekom ocjena iz liste studenti_objekti . Implementirajte u jednoj liniji koda.
Task 4.4. Definirajte klasu Krug s atributom r. Dodajte metode opseg i povrsina koje e raunati opseg i povrinu kruga. Stvorite objekt klase Krug s proizvoljnim radijusom i ispiite opseg i povrinu kruga.
Task 5.5. Define the Worker class with attributes name, position, salary. Add a work method that will print
"I work in the position \{position\}".
Add a Manager class that inherits from the Worker class and define the department attribute for it. Add method work which will print "I work in the position \{position\} in the department \{department\}".
Add a give_raise method to the Manager class that receives the parameters worker and raise i
increases the salary of the worker (Worker) by the amount of the increase.
Define one instance of the Worker class and one instance of the Manager class and call the work i methods
give raise.
Please program like begginer! copypaste solutions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!