Less than or equal in PSeInt: the <= operator
Asks whether the left value is less than or equal to the right one. Being equal counts.
- Group:
- Relational
- Template
<=
Opens the editor with this example loaded. Run it step by step and watch the flowchart.
Worked example
A complete algorithm, ready to copy and run.
Algoritmo Example Escribir 5 <= 5FinAlgoritmoOutput
Shows: VERDADERO (they're equal, and that counts)
This is what the console shows when the example runs.
VERDADEROIn a flowchart
This is how it appears in a flowchart, with the same shapes Codoritmo draws.
Template
The general form. Replace what's inside < > with your own data.
<=Examples that use it
Programs from the example library where it appears, from the simplest to the most complete.
Guess the Number
Guess a secret number from 1 to 100 in seven tries.
IntermediateLinear Search
Finds a name in a list, ignoring upper and lower case.
IntermediateBubble Sort
Sorts random numbers by swapping neighbors, and stops as soon as they're in order.
IntermediateSelection Sort
Finds the smallest of the remaining numbers and puts it in its place.
IntermediateInsertion Sort
Inserts each number among the sorted ones, like arranging cards in your hand.
IntermediateCounting Sort
Counts how many times each value appears, without comparing numbers.
Intermediate
More relational
Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.