I hereby claim:
- I am cisnerosoc on github.
- I am cisnerosoc (https://keybase.io/cisnerosoc) on keybase.
- I have a public key ASDTDz3AyhVCAXPCkEEDKJqFu-D5XDmBHnBYHwKVbnQKqAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class Person | |
atten_reader :age, :mood, :occupation | |
def initialize | |
@age | |
@mood | |
@occupation | |
end | |
def get_age(a) | |
@age = a |
class Person | |
def get_age(a) | |
@age = a | |
end | |
def get_occupation(o) | |
@occupation = o | |
end | |
def get_mood(m) |
class Calculator | |
def double(number) | |
number * 2 | |
end | |
def add(number1,number2) | |
number1+number2 | |
end | |
def subtract(number1,number2) | |
number1 - number2 |
class Car | |
def new_car | |
new_car= [] | |
end | |
def empty_array | |
return new_car | |
end | |
def parts(part) | |
part=gets.chomp | |
new_car << part |
class Car | |
def new_car | |
new_car= [] | |
end | |
def empty_array | |
return new_car | |
end | |
def parts(part) | |
part=gets.chomp | |
new_car << part |
class Dog | |
end | |
class House | |
end | |
class Man | |
end | |
class Song | |
end | |
class Car | |
end |
class Dog | |
end | |
class House | |
end | |
class Man | |
end | |
class Song | |
end | |
class Car | |
end |
page_width = 60 | |
puts ('Table of Contents'.center(page_width)) | |
puts '' | |
puts ('Chapter 1: Getting Started'.ljust(page_width/2) + 'page 1'.rjust(page_width/2)) | |
puts ('Chapter 2: Numbers'.ljust(page_width/2) + 'page 9'.rjust(page_width/2)) | |
puts ('Chapter 3: Letters'.ljust(page_width/2) + 'page 13'.rjust(page_width/2)) |
What happens if you try to put an array inside another array? | |
The array would take a spot in the array. | |
What about an array inside an array inside an array? | |
You can add an array in side of an array inside of an array. This is called a multi dimensional array. | |
And how can you access the values that are inside these inner arrays? | |
by using brackets - array = [0][1] |