Booleans Flashcards

1
Q

What is a boolean?

A

A boolean is a data type value which is either true or false.

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

True or False Value: 0

A

True

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

True or False Value: “”

A

True

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

True or False Value: [ ]

A

True

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

True or False Value: “hello”

A

True

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

True or False Value: nil

A

False

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

True or False Value: 2.3

A

True

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

True or False Value: true

A

True

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

True or False Value: TRUE

A

True

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

True or False Value: false

A

False

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

True or False Value: FALSE

A

False

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

True or False Value: [1,2]

A

True

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

True or False Value: {:greeting => “hi”}

A

True

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

True or False Value: !true

A

False

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

True or False Value: !false

A

True

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

True or False Value: !!”pizza”

A

True

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

True or False Value: !!nil

A

False

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

True or False Value: true && true

A

True

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

True or False Value: true && false

A

False

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

True or False Value: false && false

21
Q

True or False Value: true || true

22
Q

True or False Value: true || false

23
Q

True or False Value: false || false

24
Q

True or False Value: 3 == 3

25
Q

True or False Value: 5 == 6

26
Q

True or False Value: “hello” == “hello”

27
Q

True or False Value: 15 == 15 || 10 != 12

28
Q

True or False Value: 5 == 5 && 12 == 10

29
Q

True or False Value: true && 8 == 8

30
Q

True or False Value: true || 4 == 4

31
Q

True or False Value: false && 8 != 8

32
Q

True or False Value: “taco” == “tacos”

33
Q

True or False Value: “taco” != “tacos”

34
Q

True or False Value: 8 != 2 && 20 == 10

35
Q

True or False Value: “boolean” == 1

36
Q

True or False Value: !(true && false)

37
Q

True or False Value: !(1000 == 1 || 10000 == 10000)

38
Q

True or False Value: !(10 == 10 && 20 != 10)

39
Q

True or False Value: !(1 != 100 || 30 == 40)

40
Q

True or False Value: !(“boolean” == “booleans” && “Code” == “Fun”)

41
Q

True or False Value: 1 == 1 && (!(“boolean” == 1 || 1 == 0))

42
Q

True or False Value: “strong” == “coffee” && (!(30 == 40 || 30 == 30))

43
Q

True or False Value: 30 == 30 && (!(“boolean” == “booleans” || “Coding” == “Awesome”))

44
Q

True or False Value: 14 > 3

45
Q

True or False Value: “yellow” == “yellow”

46
Q

my_mood = “happy”

True or False Value: my_mood == “happy”

47
Q

easter_eggs = 16
ducklings = 3
True or False Value: easter_eggs > ducklings

48
Q

easter_eggs = 16
ducklings = 3
True or False Value: ducklings >= easter_eggs

49
Q

easter_eggs = 16
ducklings = 3
True or False Value: ducklings == easter_eggs