Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional evaluation
#5
It does not work for me like this:
    a1 =  float(result1[0] * 0.1)
    b1 =  float(row[2]) #row2- 1продукт
    silos1a = b1 - a1
if silos1a < 0
    print ("Расход:"f'{silos1a:.1f}')
else b1 - 6553.5 - a1
    print ("Расход:"f'{silos1a:.1f}')
SyntaxError: invalid syntax
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,763 Oct-09-2023, 05:38 PM
Last Post: snippsat
  Evaluation of two different list in python? go127a 8 3,711 Apr-22-2019, 12:49 PM
Last Post: snippsat
  list evaluation go127a 2 2,522 Apr-12-2019, 11:13 AM
Last Post: DeaD_EyE
  operand evaluation order? insearchofanswers87 2 2,892 Sep-26-2018, 07:51 PM
Last Post: insearchofanswers87
  Recursive evaluation in parsley parser mqnc 0 2,612 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