-1

I tried this code, but I get a SyntaxError:

if measured_dec =< 0.523966303045:
    print "WARNING! Object may be below Horizon!"

What is wrong?

4 Answers 4

2

Your less than or equals operator is the wrong way around, change it to this:

if measured_dec <= 0.523966303045:
    print "WARNING! Object may be below Horizon!"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I can't believe I missed that
0

The less-than-or-equal operator goes the other direction. It should be <= not =<

if measured_dec <= 0.523966303045:
    print "WARNING! Object may be below Horizon!"

1 Comment

Thanks, I can't believe that I missed something so simple
0

It may be because of "=<"

Try using:

if measured_dec <= 0.523966303045:
    print "WARNING! Object may be below Horizon!"

1 Comment

Thanks, I can't believe I missed that
0

The less than or equal to operator is like this '<='. Try it by changing the statement to the following.

if measured_dec =< 0.523966303045:
   print "WARNING! Object may be below Horizon!"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.