Closed dnear1 closed 3 years ago
I personally tested all the codes and dont know how this mistake still slipped in (you're refering to the misplaced)
for str
right?). I'll correct it, thanks for higlighting and sorry for the inconvenience.
The missing end bracket was at the end of the statement, not after lt.light(), and I had to change the 3 ',' to '+' to get it to run
The issue is fixed now. Thanks again. I will close the issue here. Just to confirm, it can work with +
inside the str(...)
block, or (,
and +
) inside the print(...)
as a string delimiter. The comma will add spaces, while the plus will directly concatenate strings
https://github.com/pycom/pycom-libraries/blob/b92cea79b32fc89bff4153f5f5f0840a988a52d2/shields/pysense_2.py#L51
says print("Light (channel Blue, channel Red): " + str(lt.light()," Lux: ", str(lt.lux()), "lx"))
Should say print("Light (channel Blue, channel Red): " + str(lt.light()) + " Lux: " + str(lt.lux()) + "lx")
Does anyone even test this stuff?