-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex6.rb
36 lines (30 loc) · 784 Bytes
/
ex6.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# set types of people
types_of_people = 10
# use number in sentence
x = "There are #{types_of_people} types of people."
# set types of binary
binary = "binary"
# set types of do not
do_not = "don't"
# call two vars (string 1, 2) in sentence
y = "Those who know #{binary} and those who #{do_not}."
# prints first string w vars
puts x
# prints second string w vars
puts y
# print first string (in string 3)
puts "I said: #{x}."
# print second string (in string 4)
puts "I also said: '#{y}'."
# set hilarious to false
hilarious = false
# call var inside string
joke_evaluation = "Isn't that joke so funny?! #{hilarious}"
# print string
puts joke_evaluation
# set var
w = "This is the left side of..."
# set var
e = "a string with a right side."
# print concatenated vars
puts w + e