Im having trouble with this code using Ruby can you please m

I\'m having trouble with this code using Ruby, can you please modify the code so the output will read:

The problem is that I need to manipulate the hash, and simply writing a series of puts commands will be incorrect

Here\'s the current code I have:

cars = {
\'altima\' => \'nissan\',
\'camry\' => \'toyota\',
\'rx7\' => \'mazda\',
\'malibu\' => \'chevy\'
}

puts cars.values


puts \'==============\'

L 121 1 Hash hash .rb nissan toyota mazda chevy \"rx7\"- \"mazda\'\')

Solution

#!/usr/bin/ruby

inp=$stdin.read           //read input from console and store in inp
          
inp1=$stdin.read       //read input from console and store in inp1

inp2=$stdin.read       //read input from console and store in inp2

inp3=$stdin.read       //read input from console and store in inp3

puts inp           //print output inp into the console
puts inp1           /print output inp1 into the console
puts inp2           /print output inp2 into the console
puts inp3               /print output inp3 into the console

I\'m having trouble with this code using Ruby, can you please modify the code so the output will read: The problem is that I need to manipulate the hash, and si

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site