Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,49 @@
string1 = input("Please enter a string.")
string2 = input("Please enter a second string.")
//Comparing two strings for exact equality
if string1 == string2 then
print "Strings are equal."
end if
//Comparing two strings for inequality
if string1 != string2 then
print "Strings are NOT equal."
end if
//Comparing two strings to see if one is lexically ordered before than the other
if string1 > string2 then
print string1 + " is lexically ordered AFTER " + string2
//Comparing two strings to see if one is lexically ordered after than the other
else if string1 < string2 then
print string1 + " is lexically ordered BEFORE " + string2
end if
//How to achieve case sensitive comparisons
//Comparing two strings for exact equality (case sensitive)
if string1 == string2 then
print "Strings are equal. (case sensitive)"
end if
//Comparing two strings for inequality (case sensitive)
if string1 != string2 then
print "Strings are NOT equal. (case sensitive)"
end if
//How to achieve case insensitive comparisons within the language
//Comparing two strings for exact equality (case insensitive)
if string1.lower == string2.lower then
print "Strings are equal. (case insensitive)"
end if
//Comparing two strings for inequality (case insensitive)
if string1.lower != string2.lower then
print "Strings are NOT equal. (case insensitive)"
end if