Forum in maintenance, we will back soon 🙂
Notifications
Clear all
Loop python
Topic starter
Â
please don't skip any things when you teach something..
Â
what key did you put to make it simple?
Â
counter = counter + 1
counter += 1
Â
Posted : 07/11/2023 12:07 pm
sorry, what did I skip?
what exactly is not clear here?
Posted : 07/12/2023 10:46 am
(@jay-kim) You can't get any simpler. What don't you understand? If you can't understand this simple piece of code then you'll not be able to continue with learning how to code.
Â
We set a variable named counter to an initial value of 1
then we create a loop that evaluates the value of the variable counter and while it is less than or equal to 10 we add 1 to the variable counter.
The loop stops when the variable counter reaches the value of 11.
Â
There are two ways to increment (add to) the variable counter and both have the same result:
Â
1) >>> counter = counter + 1Â ### Add 1 to the value of counter and store it back into the variable counter.
2) >>> counter += 1Â ### Shorthand method that evaluates to the same as the first method.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
Posted : 07/12/2023 5:40 pm
Hasan Aboul Hasan reacted
Topic starter
@ssadvisor what I asked was just how to make it short with keyboard..Â
Â
totally agree with you. have to know from the scratch to make it done. but now not sure I could get what he said..Â
Posted : 07/14/2023 1:01 pm
@jay-kim You just type it shorter; no keyboard tricks.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack
Posted : 07/16/2023 12:00 am
Topic starter
Posted : 07/16/2023 8:07 am
Forum Information
Our newest member: Shaik Abdul Raheem
Latest Post: Affiliate tool.
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed
[the_ad_group id="312"]