Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Dorota Parzych](https://uploads.teamtreehouse.com/production/profile-photos/10735860/micro_69002368_2431039847220518_2779241459994329088_o.jpg)
Dorota Parzych
5,706 Pointscode problem-syntax error
num = input("Please enter number: ")
def how_big(number): if number <= 10 print("za malo") else number > 11 print("za dużo") elif number == 11 print("Idealnie")
how_big(num)
Inline 4 there is a syntax error - don't know how to fix it
2 Answers
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsSee the first example here. It is close to what you are trying to do. Notice:
- if, elif, else statements end with a colon
- else comes last and has no condition. It is what runs when all other conditions are false
- the input is converted to an integer before being compared to other numbers
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsConvert number to int before passing to the function. This can be done with the input:
num = int(input("Please enter number: "))
def how_big(number):
if number <= 10:
print("not enough")
elif number == 11:
print("perfect")
else :
print("too much")
how_big(num)
Dorota Parzych
5,706 PointsDorota Parzych
5,706 Pointsso now it looks like this... num = input("Please enter number: ")
def how_big(number): if int(number) <= 10: print("not enough") elif number == 11: print("perfect") else : print("too much")
how_big(num)
Generally, it works but when I type 11 it shows me that it is too much - why and how to fix that?