to be clear, my line 10 looks like this:
puts "There are #{cars} cars available."
But, yeah, complete Ruby noob here as well so I don't really know what's wrong.
puts "There are #{cars} cars available."
But, yeah, complete Ruby noob here as well so I don't really know what's wrong.
Yes, this will throw an error in Ruby because of line 1:
>1 cars = 100
Ruby does not allow the mixing of integers and strings. So, as mentioned, you can invoke the .to_s method. Or you can interpolate the variables as you have done so with #{cars} inside double quotes.