6. Norman Clarke
HTML (HTML Abstraction Markup Language)
Why?
Markup should be beautiful
DRY
Markup should be well-indented
XHTML structure should be clear
www.haml.info
10. Puts “Hello World”
Save
Run for your life
11. Ifwe list all the natural numbers below 10
that are multiples of 3 or 5, we get 3, 5, 6
and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5
below 1000.
12. sum =0
for i in 1...1000 do
if (i%3==0 or i%5==0)
sum += i
end
end
puts sum
13. By listing the first six prime numbers: 2, 3, 5,
7, 11, and 13, we can see that the 6th prime
is 13.
What is the 10 001st prime number?
14. require 'mathn'
counter =0
last = nil
Prime.each(100000000000) do |i|
counter += 1
last = i
break if counter==10001
end
print last
15. Watch this
http://net.tutsplus.com/sessions/ruby-for-
newbies/
Solve this :
http://projecteuler.net/problem=2
http://projecteuler.net/problem=13
16. Each new term in the Fibonacci sequence is
generated by adding the previous two terms.
By starting with 1 and 2, the first 10 terms
will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci
sequence whose values do not exceed four
million, find the sum of the even-valued
terms.
17. Work out the first ten digits of the sum of
the following one-hundred 50-digit numbers.
371072875339021027987979982208375902465
10135740250
463…………….124896970078050417018260538
743249861995247410594742333095130581237
26617309629