Python Forum
Mathematical Conversion Scripts for Weather Station
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mathematical Conversion Scripts for Weather Station
#8
(Jun-20-2020, 01:56 PM)Mickey53usa Wrote: buran;
No, I don't think that the formula in question is wrong.
Yes, you do. Just print it without any formatting so that you see what you really get


the string formatting decimal places does not affect the decimal point
>>> preasure = 26.78371
>>> f'{preasure:.2f}'
'26.78'
>>> f'{preasure:.5f}'
'26.78371'
>>> preasure = 26783.71
>>> f'{preasure:.2f}'
'26783.71'
>>> f'{preasure:.5f}'
'26783.71000'
as you can see it fill in with 0 if not enough decimal digits, it does not move the decimal point
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Mathematical Conversion Scripts for Weather Station - by buran - Jun-20-2020, 04:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  plotting based on the results of mathematical formulas Timur 1 365 Feb-08-2024, 07:22 PM
Last Post: Gribouillis
  Taking Mathematical Expressions from Strings quest 2 722 Jul-02-2023, 01:38 PM
Last Post: Pedroski55
  Copying files from a remote Windows station tester_V 11 6,933 Jul-17-2021, 02:19 AM
Last Post: tester_V
  About mathematical equations seyidcemkarakas 3 2,077 Oct-04-2020, 01:21 PM
Last Post: Gribouillis
  Recognising mathematical expressions from word and pdf file Preeti15 0 1,809 Aug-19-2020, 09:06 AM
Last Post: Preeti15
  Parsing Date/Time from Metar Reports with 6 hourly weather information Lawrence 0 2,367 May-03-2020, 08:15 PM
Last Post: Lawrence
  Mathematical Operators in String AgileAVS 1 2,408 Mar-04-2020, 04:14 PM
Last Post: Gribouillis
  Mathematical function input Tiiill 2 2,743 Sep-10-2019, 09:25 PM
Last Post: nilamo
  Beginner user: mathematical operations Mahdi1994 1 2,866 Mar-19-2018, 11:07 AM
Last Post: Larz60+
  how to make a mathematical operation without the command "print" ewar2606 4 2,985 Mar-15-2018, 07:19 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020