Readin .CSV file with Ruby

This time I won’t explain like in the previous post about how to instal ruby and stuff. I’m just going to tell you about my homerwork for school. For our class at tuesday we needed to make a program on ruby, python or perl and we were ment to fill out a form in which we needed to enter out name, class, the language we used and  a link to our repositories.

My homework for tomorrow is to read this table and print information about what language we have used and to sum the numbers of the people that used ruby and on the people that used python. It’s quite simple after the teacher told us how to use ruby. I only needed to add some extra lines in the source code, because some of my classmates haven’t written their number in the form. The reason why I haven’t made an ‘if’ for perl is because nobody has used it. However switching between ruby and python was extremely easy and it didn’t take me a lot of time to do it.

Here’s a link to my homework: https://github.com/powerworr/Ruby/blob/master/read_csv.rb

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s