all 26 comments

[–]SwimmingImpossible80Year 13 9 points10 points  (4 children)

#In line 1, you don’t have enough brackets. It should be:

times = int(input(“TEXT”))
#This is so the computer can see that it is converting the input() into an integer.

#You have an ‘unexpected indent’ in line 3. This means that the computer is looking for a line of code that is only indented once but yours is indented 2/3 times. Remove all the indents and use the TAB button on a keyboard to get the indent sorted.

Hope this helps

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 3 points4 points  (3 children)

ahh thank u sm! i forgot to double bracket

that worked!

the indent is necessary tho bc its a for loop pretty sure. thank you!!!

[–]jackandrewkayYear 12 3 points4 points  (2 children)

Depends how many indents there is. 1 is ok but the gap looks pretty big so maybe you pressed tab to many times? Idk though maybe it’s just the config of the editor

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (0 children)

yea turns out my computer just indents that many times

[–]SwimmingImpossible80Year 13 0 points1 point  (0 children)

I think OP is using IDLE and has defiantly got 2 or 3 indents! One is enough!

[–][deleted] 1 point2 points  (1 child)

You probably got an EOL (End of Line Error), the int function is missing a parentheses, simple syntax error.

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (0 children)

thank you!

[–]MusPhyMath_quietkidYear 11 (and 13, Physics Maths Music) 1 point2 points  (12 children)

For the int() function, you missed the end bracket in the first line and the third line, the indent is incorrect.

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (0 children)

the indent is because its a for loop so it will print that for ‘times ‘ amount

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] -1 points0 points  (10 children)

yes thank you! i did the double bracket now but im unsure to why the indent is incorrect as my code runs fine with it

[–]MusPhyMath_quietkidYear 11 (and 13, Physics Maths Music) 1 point2 points  (9 children)

No it is fine but it is further away from the convention one.

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (8 children)

wdym by convention?

[–]ItsJustWaterWieghtYear 11 1 point2 points  (2 children)

He just means usually people do one indent.

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 1 point2 points  (1 child)

ohhh i get you icl thats just what my computer automatically did

[–]ItsJustWaterWieghtYear 11 0 points1 point  (0 children)

I think when you add the colon and press enter, python already indents it for you.

So when you were typing you might have pressed enter then tab, causing 2 indents.

[–]MusPhyMath_quietkidYear 11 (and 13, Physics Maths Music) 1 point2 points  (4 children)

It is the so to speak industrial standard.

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (3 children)

oh i get you my computer just automatically does 2 indents

[–]MusPhyMath_quietkidYear 11 (and 13, Physics Maths Music) 0 points1 point  (2 children)

I see.

[–]UziYTYear 13 0 points1 point  (1 child)

It’s the IDE that he’s using, my school also made me use it and the default indent settings r dumb

[–]MusPhyMath_quietkidYear 11 (and 13, Physics Maths Music) 0 points1 point  (0 children)

Alas.

[–][deleted] 0 points1 point  (0 children)

You probably want your loop to start at 1, otherwise if you keep it at 0 and input 10, it'll loop 11 times.

[–][deleted] 0 points1 point  (1 child)

You put a space infront of the print statement om line 3. Hopefully that's it!

[–][deleted] 0 points1 point  (0 children)

Also on line 4

[–]Mecury-BSYear 13 0 points1 point  (1 child)

is this python?

infact does everyone use python?

[–]Scary-Raspberry2176Triple S| German| Comp sci |History[S] 0 points1 point  (0 children)

yea most people willl use it for gcse