1
Hello. This is my first post on Stackoverflow so a thousand pardons if I ever make a mistake.
Guys, can you help me? I’m trying to develop a code in Python that can calculate the Linear Dilation of some material informed via function. But I have a problem with setting alpha in the equation. In physics, an example of alpha for linear dilation calculations is (10 * 1.2 -5)°C -1. But if I put this calculation into a python variable, when trying to print, it displays this as a calculation and not as a value.
An example:
Linear expansion of an iron plate whose (delta)T (final temperature minus initial temperature) will be 30m, the plate size will be 100m and the alpha will be (10*1.2 -5)°C -1
Delta L = 100 x (10*1,2 -5) x 30 Delta L = 3600 -5m °C -1 (I’m not continuing to avoid some tithe)
This is the result of equation 3600 -5 m °C -1
If I wanted to play this same calculation in python and make the printed result the same, as I should do?
Welcome, Show us how you tried to do in Python...
– ederwander
i didn’t even try because I already knew that the interpreter would consider (10*1,2 -5)°C -1 as a calculation, I want to know how I can do this code
– krtEazyyyy
Hummm which Python version is using ?
– ederwander
This is confusing. Both
*
andx
in its code represent multiplication?10*1,2^-5
can be written as1.2 * (10 ** -5)
, that helps?– Andre