-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?

Karl Knechtel
61.5k14 gold badges134 silver badges194 bronze badges
asked Jul 31, 2012 at 14:57

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!"
answered Jul 31, 2012 at 15:00
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!"
answered Jul 31, 2012 at 15:00

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!"
answered Jul 31, 2012 at 15:01

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!"
answered Aug 9, 2012 at 10:26

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.