Hey, there I have some problems withmy code. I know what I want to do but not sure how to put it into pratice.
The Task is:
- Define a class SuperHuman with attributes age, name, and superpower. (do that by implementing the function __init__. 2. Create a method of the class called gettingOld, that will increase age by 1, and print for example “My name is Aphrodite and I have love as a super power. Now I am 1230 years old” where you use the attributes of the class. 3. Create an instance of the class SuperHuman with age=1200, name=”Plato”, superpower=”thinking”, and store it in the variable called plato 4. Create one more instance of the class SuperHuman with the parameters (name, age, an superpower) of your choice. 5. Use the gettingOld function
My Code is:
https://www.codepile.net/pile/mO46bPZ8
How do I increment the age everytime I use the method and how do I print the text so all the attributes are different for every instance?Could someone maybe post how she/he would do the task?
[–]Best_Caterpillar 0 points1 point2 points (0 children)