Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional evaluation
#7
It worked in this version:
a1 =  float(140.2)
b1 =  float(6543.5)
silos1a = b1 - a1
if silos1a > 0:
    print(f'Расход: {silos1a:.1f}')

else:
    silos1a = b1 - 6553.5 - a1
    print(f'Расход: {silos1a:.1f}')
Reply


Messages In This Thread
Conditional evaluation - by stsxbel - May-31-2021, 01:28 AM
RE: Conditional evaluation - by perfringo - May-31-2021, 06:00 AM
RE: Conditional evaluation - by stsxbel - May-31-2021, 07:43 AM
RE: Conditional evaluation - by Gribouillis - May-31-2021, 09:07 AM
RE: Conditional evaluation - by stsxbel - Jun-03-2021, 03:58 AM
RE: Conditional evaluation - by snippsat - Jun-03-2021, 04:38 AM
RE: Conditional evaluation - by stsxbel - Jun-13-2021, 06:56 PM
RE: Conditional evaluation - by Gribouillis - Jun-13-2021, 08:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UndefinedEnvironmentName: 'extra' does not exist in evaluation environment EarthAndMoon 3 1,766 Oct-09-2023, 05:38 PM
Last Post: snippsat
  Evaluation of two different list in python? go127a 8 3,712 Apr-22-2019, 12:49 PM
Last Post: snippsat
  list evaluation go127a 2 2,523 Apr-12-2019, 11:13 AM
Last Post: DeaD_EyE
  operand evaluation order? insearchofanswers87 2 2,893 Sep-26-2018, 07:51 PM
Last Post: insearchofanswers87
  Recursive evaluation in parsley parser mqnc 0 2,613 Apr-13-2018, 09:02 PM
Last Post: mqnc
  Learning Python, newbie question about strings and evaluation new_learner_999 13 6,070 Feb-18-2018, 03:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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