HELLO WORLD
a = 14 b = 25 a = b - a binding.pry # First breakpoint c = 4 d = 7 e = c + d c = 1 binding.pry # Second breakpoint f = (g = 2) + 1 g = (f == 2) binding.pry # Third breakpoint h = true if !h i = 23 else i = 11 end binding.pry # Fourth breakpoint j = 3 def f(x) 2*x end j = f(j) + f(f(j)) + f(f(f(j))) binding.pry # Fifth breakpoint while a > 0 puts "Hello" a -= 2 end
<h3>Q-06</h3>
What are the values of `a` and `b` when the program hits the first breakpoint? Why?
<h3>Q-07</h3>
What are the values of `c`, `d` and `e` by the second breakpoint? Why?
<h3>Q-08</h3>
What are the values of `f` and `g` by the third breakpoint? Why?
<h3>Q-09</h3>
What are the values of `h` and `i` by the fourth breakpoint? Why?
<h3>Q-10</h3>
What is the value of `j` by the fifth breakpoint? Why?
<h3>Q-11</h3>
By the end of the program, what is the final value of `a`, and how many times has "Hello" been printed to the terminal?
<h3>Q-12</h3>
Write a method in Ruby called "type_it_x_times" that takes in a number `X` as input and **returns** a string containing that number `X` times in a row. Assume `X` will always be greater than or equal to 1.
e.g. <br />
```ruby
type_it_x_times(1)
=> "1"
type_it_x_times(4)
=> "4444"
type_it_x_times(7)
=> "7777777"
GitHub provides a workflow for creating a new repository:
```markdown
1. touch README.md
2. git init
3. git add README.md
4. git commit-m "first commit"
5. git remote add origin git@github.com:some_username/some_repo.git
6. git push -u origin master
```
Describe what each command does, line by line.