Input And Output
Goals
Step 1
Type this in irb:puts 'Hello World'Expected result:irb :006 > puts 'Hello World' Hello World => nil irb :007 >
Step 2
Type this in the file input_and_output.rb:print "All" print " " print "in" print " " print "a" print " " print "row"Type this in the terminal:ruby input_and_output.rb
Step 3
Type this in the file conditionals_test.rb:print "How many apples do you have? > " apple_count = gets.to_i puts "You have #{apple_count} apples."Type this in the terminal:ruby conditionals_test.rb
Challenge(s)
What do you want to say? > sally sells seashells You said: sally sells seashells
Next Step:
Go on to Numbers And Arithmetic
Back to Numbers And Arithmetic