Hey, I'm trying to create a basic program that will generate a number based on variables entered by the user. The formula is
a = b / (c * d)
This is a formula for finding specific heat, whereas b=energy
, c=mass
, and d= change in temperature
.
So my problem is that I'm not making this program for myself, otherwise I could just assign each variable a number- like:
b= 1200
c= 13
d= 2
And then do a = a = b / (c * d)
.
My goal though, is to create a program for others who don't already know the formula- so that they can simply enter the numbers themselves. Example- I want b = X
. X
is the number entered by the user of the program. However, I have to define X
as a variable first- I want it to be unknown- or based on what a person enters. I don't want b
, c
, or d
to have assigned values. It's a very basic scripting process I know, but I'm new to Python.
Thanks a lot.