I am getting any abnormal error stating–> invalid character in identifier
I have attached the image please help!
I am getting any abnormal error stating–> invalid character in identifier
I have attached the image please help!
Know more about python identifiers here.
Still getting problem? then show your code.
hi @vvksinghai17
By looking in this attached image, I think you haven’t given space b/w print and the brackets. It should be like this:
print (“The current price is”, price_fetched)
… one space here
If this is not the issue then please send the code you have written.
Please check the spelling & letter case. As python is a case sensitive language, check it once more whether the identifier called in print function is the same as of the variable defined before.
Hope this helps…
My code is in below reply . please check and suggest correction.
Hi @vvksinghai17
The problem is in your while loop. It should be like this:
while True:
price_fetched = get_bitcoin_price()
print (“The current price is”, price_fetched) # The content in double quotes should be green in color.
print (“Your selling price is”, selling price)# The content in double quotes should be green in color.
if price_fetched > selling_price:print (“The current price is greater than the selling price”)# The content in double quotes should be green in color.
buzzer = mybolt.digitalWrite (‘0’, HIGH)
print (buzzer)
time.sleep(30)
*the double quotes you entered in print should be same as the ones you used in URL ="…"
*the if condition in the while loop should have correct spaces as i have shown above and the last line time.sleep(30) should be inside the while loop.
Hope this works for you…