Operators Flashcards

(50 cards)

1
Q

+

A

add

2 +4 = 6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

+

A

add

2 +4 = 6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

-

A

subtract

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

*

A

multiply

2 *4 = 8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

**

A

power of

2**4 = 16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

/

A

Divide

2/4.0 == 0.5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

%

A

modulus

2 % 4 ==2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

.

A

Dot access

“1”.to_i == 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

::

A

Colon access

Module::Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

[]

A

list brackets

[1,2,3]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

!

A

not

!true == false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A

less than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

>

A

greater than

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

> =

A

greater than or equal to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

<=

A

less than or equal to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

<=>

A

comparison

4 <=> 4 == 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

==

A

equal

4 =4 = true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

===

A

Equality

4 ===4 = true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

!=

A

not equal

4 != 4 = false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

&&

A
Locical and (higher precedence)
true &amp;&amp; false = false
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

||

A
Logical or (higher precedence)
true || flash = true
22
Q

..

A
range inclusive 
(0..3).to_a = [0,1,2,3]
23
Q

A

Range non inclusive

(0…3).to_a = [0,1,2]

24
Q

@

A

Object scope

@var ; @@classvar

25
@@
Class scope | @var ; @@classvar
26
$
global scope | $stdin
27
-
subtract
28
*
multiply | 2 *4 = 8
29
**
power of | 2**4 = 16
30
/
Divide | 2/4.0 == 0.5
31
%
modulus | 2 % 4 ==2
32
.
Dot access | "1".to_i == 1
33
::
Colon access | Module::Class
34
[]
list brackets | [1,2,3]
35
!
not | !true == false
36
"
less than
37
>
greater than
38
>=
greater than or equal to
39
<=
less than or equal to
40
<=>
comparison | 4 <=> 4 == 0
41
==
equal | 4 =4 = true
42
===
Equality | 4 ===4 = true
43
!=
not equal | 4 != 4 = false
44
&&
``` Locical and (higher precedence) true && false = false ```
45
||
``` Logical or (higher precedence) true || flash = true ```
46
..
``` range inclusive (0..3).to_a = [0,1,2,3] ```
47
...
Range non inclusive | (0...3).to_a = [0,1,2]
48
@
Object scope | @var ; @@classvar
49
@@
Class scope | @var ; @@classvar
50
$
global scope | $stdin