Skip to Content
Learn Red ? Fundamentals of Red
book

Learn Red ? Fundamentals of Red

by Ivo Balbaert
May 2018
Beginner content levelBeginner
252 pages
6h 19m
English
Packt Publishing
Content preview from Learn Red ? Fundamentals of Red

Questions

  1. Give the results of the following statements. Do it in your head first, then verify it in the console:
      if 0 [print "0 is true"]      if 13 = 13.0 [print "ok"]      if 13 == 13.0 [print "ok"]
  1. What is the value of out after executing the following statements?
      p: 7      out: either p == 7.0 ["p is 7"]["bad luck"]
  1. Write a code snippet that asks the user whether it is raining, and provide the appropriate whether or not it is raining. Use the multiline block style.
  2. Write a switch snippet where the values are of different datatypes—for example, use an item variable that has the "red" value and test on different values.
  3. Write a case snippet that tests whether a name word contains a vowel (a, e, i, o, or u). Hint: The conditions are of the form  ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

How I Built a Personal Board of Directors With GenAI

How I Built a Personal Board of Directors With GenAI

Vipin Gupta
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
Why AI Demands a New Breed of Leaders

Why AI Demands a New Breed of Leaders

Faisal Hoque, Thomas Davenport, Erik Nelson

Publisher Resources

ISBN: 9781789130706Supplemental Content