Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

coding Ruby 1. The following codeblock has an error in it. Fix it so it prints The answer to the ultimate question of life, the

coding Ruby

1. The following codeblock has an error in it. Fix it so it prints "The answer to the ultimate question of life, the universe, and everything is 42" on the screen.

puts 'i'm using Ruby!'"

2. The following codeblock has an error in it. Fix it so it prints "The answer to the ultimate question of life, the universe, and everything is 42" on the screen.

answer = 42 puts "The answer to the ultimate question of life, the universe, and everything is " + "answer"

3.Keeping in mind there are 86400 seconds in a day, write a program that calculates how many seconds there are in a week, if a week is 7 days. Print the result on the screen.

4.What does the Ruby expression 7 * 10 + 2 evaluate to?

5.What does the Ruby expression "Hello" + "World!" evaluate to?

6.What does the Ruby expression 10 % 10 evaluate to?

7.What does the Ruby expression (2**2) == 4 evaluate to?

8.Keeping in mind order of precedence, what does the following expression evaluate to? 1 < 2 || 5 > 4 && 7 <= 7

9.What does the boolean expression !false && true evaluate to?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

2. Employees and managers participate in development of the system.

Answered: 1 week ago