r/PythonLearning • • 3d ago

i am stuck with the range function

sorry but i am gonna crash out because of the range function i cant understand it well to use it this is driving me crazy any one could give me a video explaining everything i dont mind it being an hour long

8 Upvotes

33 comments sorted by

View all comments

Show parent comment

-1

u/Repulsive-Song-1594 3d ago

Ni↑ is Ni just adding number up Like first 2 Second 2+4 = 6 Third 6+6 = 12 Fourth 12+9 = 21 Till the end

4

u/tmtowtdi 3d ago

You do not get bonus points for using as few words as possible.

You're not stating your problem clearly, nobody understands what you're talking about. Take a breath and try to type out what you mean exactly. You're allowed to use punctuation, just be clear.

2

u/ninhaomah 3d ago edited 3d ago

Then where does Xi in your example comes in ?

If 2+4 = 6 then why not 6+4 = 10 ?

Why suddenly 6+6 ?

If 21 is because 12+9 then what happened to 15 which is 9+6 ?

0

u/Repulsive-Song-1594 3d ago

Maybe i missed calculating i was almost asleep writing that about xi i will use it later just not in this i care now about just the ni

1

u/mountain-snowman 3d ago

You are having trouble using range for a specific scenario, right? Write the code without range (even static code is fine), post the code here and ask how to achieve the same using range? You will get your answer with explanation.