Please Help

Here is my code:

for i in range(22):
if i < 20:
print i “is less than twenty.”
elif i == 20:
print i " is twenty."
else:
print “UHHH”

I don’t know what’s wrong with it.
Thank You

Not sure what you’re trying to do exactly. Also not sure how your code may or may not be indented. When you paste code in your message, use three back tics on the line above your code and again on the line below your code.

```
code goes here
```

Anyhow, you have a few syntax errors assuming you’re using Python 2. Below is your code indented with the syntax errors corrected.

for i in range(22):
  if i < 20:
    print i, " is less than twenty."
  elif i == 20:
    print i, " is twenty."
  else:
    print "UHHH"

Hope this helps! && Happy coding!

1 Like