Ejemplo n.º 1
0
from classes import Planet

naboo = Planet("Naboo", 30000, 8, 'Naboo')
print(f"Name is : {naboo.name}")
print(f"Radius is : {naboo.radius}")
print(f"the gravity is: {naboo.gravity}")
print(naboo.orbit())
print(naboo.commons())

print(Planet.spin('at a very high speed'))
Ejemplo n.º 2
0
from classes import Planet

planetX = Planet('planetX', 300000, 8, 'X System')
print(f'Name : {planetX.name}')
print(f'Radius : {planetX.radius}')
print(f'Gravity : {planetX.gravity}')
print(planetX.orbit())
print(planetX.commons())
print(planetX.spin('a very high speed'))
Ejemplo n.º 3
0
from classes import Planet

naboo = Planet('naboo', 23, 3)
print(f'name: {naboo.name}')
print(naboo.spin(' a very high speed'))

new = Planet('lohit', 'new', 23)
print(new.orbit())
Ejemplo n.º 4
0
from classes import Planet


aplanet = Planet()
print(f'Name is: {aplanet.name}')
print(f'Radius is: {aplanet.radius}')
print(f'The gravity is equal to {aplanet.gravity}')
print(aplanet.orbit())
print(aplanet.planetshape())
Ejemplo n.º 5
0
from classes import Planet

# import the Planet Class

venus = Planet('Venus', 30000, 8, 'Solar System')

print(f'Name : {venus.name}')

print(venus.orbit())

# PACKAGES ARE COLLECTION OF MODULES