PSeInt NO operator (not): flip a condition
Flips a condition: true becomes false and false becomes true.
- Group:
- Logical
- Template
NO
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 NO (5 > 3)FinAlgoritmoOutput
Shows: FALSO (5 > 3 is true and NO flips it)
This is what the console shows when the example runs.
FALSOGood to know
Instead of NO you can write ~ or !. The symbols work in every profile; the word NO works in profiles that allow word operators.
Some details depend on your school's profile. See the language profiles.
In 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.
NOExamples 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.
IntermediateInsertion Sort
Inserts each number among the sorted ones, like arranging cards in your hand.
IntermediateLinear vs. Binary Search
Counts the comparisons each search needs on the same sorted list.
IntermediateReusable Validation
Validates the email and age on a sign-up form.
IntermediateShell Sort
Insertion sort between far-apart elements, with a gap that shrinks every pass.
AdvancedHeap Sort
Arranges the array as a heap, then takes the largest out again and again.
Advanced
More logical
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.