Bitcoin alert system error

above are screnshoot of my code i am getting a error as unorderable float() > str()
please help me solve this issue

@abutalahabelvadi in the step 1 change the print statement to:
print(“The Bitcoin Price is:”, current_price)

Do reply it it works :slight_smile:

1 Like

Your selling_price variable is considered str type hence cannot be compared to the float current_price.

Change your if condition to current_price > float(selling_price)

Reply if this resolves your issue :slight_smile:

I think that’s right what they have done.
The response recieved by the API is stored and returned as a float value.
Plus also notice the error message.

@abutalahabelvadi I have completed this assignment. Do as I have written, it will work :slight_smile:

So for your satisfaction , I have written a program with the same working so you can confirm. I have not used the concept of function because I just wanted to make it for the demo purpose.

Code:

Result:
bit result

1 Like

@abutalahabelvadi please reply if the problem is solved or not?

i got the solution after posting the post in mins then tried to delete this post but it was not working

Ok. So in order to close the query you click the solution on the post which you think its most correct :slight_smile:

Please close this query @abutalahabelvadi :slight_smile: