-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex32.rb
More file actions
50 lines (39 loc) · 711 Bytes
/
Copy pathex32.rb
File metadata and controls
50 lines (39 loc) · 711 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
the_count=[1, 2, 3, 4, 5]
fruits=['apples', 'oranges', 'pears', 'apricots']
change=[1, 'pennies', 'dimes', 3, 'quarters']
for number in the_count
puts "This is count #{number}"
end
fruits.each do |fruit|
puts "A fruit of type: #{fruit}"
end
for fruit in fruits
puts "A fruit of type: #{fruit}"
end
for i in change
puts "I got #{i}"
end
elements=[]
for i in (0..5)
puts "Addign #{i} to the list"
elements.push(i)
end
for i in fruits
elements.push(i)
end
for i in elements
puts "Element was #{i}"
end
i=0
numbers=[]
while i<6
numbers.push(fruits[i])
i=i+1
puts "Numbers now: #{numbers}"
end
for n in numbers
puts n
end
animals=['bear', 'tiger', 'woolf', 'chicken']
bear=animals[3]
puts bear