While loops and try/except examples#3
Open
falk7 wants to merge 7 commits into
Open
Conversation
Snooz82
requested changes
May 23, 2023
| Loop 10 times starting with 1 | ||
| Log To Console start: 1 ,inc: 1 , end:11 | ||
| Log To Console start: 1 ,inc: 1 , end:10 | ||
| FOR ${num} IN RANGE 1 10 |
Member
There was a problem hiding this comment.
Ich glaub hier müsste eher das IN RANGE geändert werden, oder?
Member
There was a problem hiding this comment.
Loop 10 times starting with 1
Log To Console start: 1 ,inc: 1 , end:11
FOR ${num} IN RANGE 1 11
Log To Console ${num}
ENDoder eben 9 times
Author
There was a problem hiding this comment.
oder so. end im Log To Console muss dann aber trotzdem 10 sein, weil das Ende im IN RANGE ja exklusiv ist
Loop 10 times starting with 1
Log To Console start: 1 ,inc: 1 , end:10
FOR ${num} IN RANGE 1 11
Log To Console ${num}
END| Exit For Loop If ${num} == 0 | ||
| Sleep 1sec | ||
| END | ||
| Log To Console 🎉🥳 HAPPY NEW YEAR !!! 🍾 No newline at end of file |
Member
There was a problem hiding this comment.
Wenn du es bei 0 enden lässt, kommt die 0 nie.
Die Idee hier war auch das Exit bzw BREAK zu zeigen.
Ich würde es so ändern.
Countdown from 10 to 0 in 10 seconds
Log To Console start: 10 ,inc: -1 , end: -1
FOR ${num} IN RANGE 10 -1 -1
Log To Console ${num}
IF ${num} == 0 BREAK
Sleep 1sec
END
Log To Console 🎉🥳 HAPPY NEW YEAR !!! 🍾
Member
There was a problem hiding this comment.
Kannst ja in die [Documentation] kurz reinschreiben, dass eine FOR Loop auch abgebrochen werden kann. " can conditionally be exited"
| Log To Console ${first} ${last} | ||
| END | ||
|
|
||
| Combines two loops of different lengths |
Member
There was a problem hiding this comment.
Combines two lists of different lengths
Author
|
willst du den noch mergen? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.