Dec-20-2019, 02:05 PM
I mean the modified code. I didn't understand the some of english terms.
using class
|
Dec-20-2019, 02:05 PM
I mean the modified code. I didn't understand the some of english terms.
Dec-20-2019, 03:44 PM
My idea was to change Rocket to this:
class Rocket (): def __init__(self, name, height): self.name = name self.height = heightSo now you have to specify the height each time you make a rocket. In your loop when you create the rocket, you just need to increase that amount by 10 each time through the loop.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness. Recommended Tutorials: BBCode, functions, classes, text adventures |
|