Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
27
Task/String-comparison/Nanoquery/string-comparison.nanoquery
Normal file
27
Task/String-comparison/Nanoquery/string-comparison.nanoquery
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
def compare(a, b)
|
||||
println format("\n%s is of type %s and %s is of type %s", a, type(a), b, type(b))
|
||||
if a < b
|
||||
println format("%s is strictly less than %s", a, b)
|
||||
end
|
||||
if a <= b
|
||||
println format("%s is less than or equal to %s", a, b)
|
||||
end
|
||||
if a > b
|
||||
println format("%s is strictly greater than %s", a, b)
|
||||
end
|
||||
if a >= b
|
||||
println format("%s is greater than or equal to %s", a, b)
|
||||
end
|
||||
if a = b
|
||||
println format("%s is equal to %s", a, b)
|
||||
end
|
||||
if a != b
|
||||
println format("%s is not equal to %s", a, b)
|
||||
end
|
||||
end
|
||||
|
||||
compare("YUP", "YUP")
|
||||
compare("BALL", "BELL")
|
||||
compare("24", "123")
|
||||
compare(24, 123)
|
||||
compare(5.0, 5)
|
||||
Loading…
Add table
Add a link
Reference in a new issue