addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Geeknight Dallas Message Board › Ruby Day 1 'Self-Study'

Ruby Day 1 'Self-Study'

R. J.
Fort Worth, TX
Post #: 9
Try your best to work each of the problems before moving on.
• The Ruby API
• The free online version of Programming Ruby: The Pragmatic Programmer’s Guide [TFH08]
• A method that substitutes part of a string
• Information about Ruby’s regular expressions
• Information about Ruby’s ranges
• Print the string “Hello, world.”
• For the string “Hello, Ruby,” find the index of the word “Ruby.”
• Print your name ten times.
• Print the string “This is sentence number 1,” where the number 1changes from 1 to 10.
• Run a Ruby program from a file.
• Bonus problem: If you’re feeling the need for a little more, write a program that picks a random number. Let a player guess the number, telling the player whether the guess is too low or too high. (Hint: rand(10) will generate a random number from 0 to 9, and gets will read a string from the keyboard that you can translate to an integer.)
R. J.
Fort Worth, TX
Post #: 10
My answers for the 'find' section of Ruby Day 1.

My solution for the 'guess a number' problem.

Richard Jensen
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy