-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
297 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
num_int = 5 | ||
|
||
num_String = "5" | ||
|
||
numResult = num_int + num_String | ||
|
||
console.log(numResult) | ||
console.log(true and false) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,6 @@ | ||
puts true && true, true && false, false && true, false && false | ||
|
||
#ou | ||
puts true || true, true || false, false || true, false || false | ||
|
||
#não | ||
puts !true, !false | ||
|
||
#and (curto-circuito) | ||
puts (true and true), (true and false), (false and true), (false and false) | ||
|
||
#or (curto-circuito) | ||
puts (true or true), (true or false), (false or true), (false or false) | ||
|
||
#not (curto-circuito) | ||
puts (not true), (not false) | ||
|
||
#e (Bit a Bit) | ||
puts (10 & 3) | ||
#1010 & 0011 = 0010 | ||
|
||
#ou (Bit a Bit) | ||
puts (10 | 3) | ||
#1010 | 0011 = 1011 | ||
|
||
#não (Bit a Bit) - Positivo | ||
puts (~ 10), (~ 3) | ||
#0 1010 -> 1 0101 | ||
#0 0011 -> 1 1100 | ||
|
||
#não (Bit a Bit) - Negativo | ||
puts (~ -10), (~ -3) | ||
# | ||
# | ||
def salutation(func_var_string = "Mundo") | ||
puts "Olá, #{func_var_string}!" | ||
end | ||
|
||
salutation | ||
salutation("Jabuti") |
Empty file.
Oops, something went wrong.