Debug: Database connection successful
You are not logged in.
If u want i could write say, class planet,
and u could tell me what its attributes are:
Radius, mass, density ..
And which member functions it needs to have. Maybe:
get_diameter()
get_surface_area()
..
something like that.
Could be as much about learning as it is about doing the programming.
Last edited by offtherock (Today 04:11:02)
Offline
Like button can go here
For offtherock ... Thank you for your interest in converting the Python program to object style!
Everything needed should be available in the existing program. The equations may have to be changed to account for the new style.
At present, the mass of the Earth is stored in the form of a variable that is then employed in the equations as needed.
If object style is used, then the property of mass must be delivered to the question in a compact form.
***
For all... Version 15 is in a development phase. The process to model Flow of thermal energy from hot gas to cold metal is not yet working. Today I'm planning to work with Gemini to improve the flow. My guess is that we do not yet have a material defined for the container wall, so we do not have properties of that material to work with, such as thermal conductivity.
In the course of this investigation I am hoping to learn about thermal energy transfer by direct contact (conduction).
(th)
Offline
Like button can go here
I downloaded the program and ran it.
You can add
###
from modules.planet import Planet
earth = Planet('Earth');
earth.g_constant = 6.67430e-11
earth.mass = 5.972e24
earth.radius = 6.371e6
earth.sea_level_density = 1.225
# Gravitational constant (N * m^2 / kg^2)
# Default units are kg and meters.
###
right beneath the first 3 import lines.
But u need to make a folder called modules.
and in that folder, place file planet.py and put in that file:
class Planet:
def __init__(self, name):
self.name = name
def set_mass(self,new_mass):
self.mass = new_mass
Offline
Like button can go here