Converting a Python Script to Ruby

Can anyone assist me with converting this python script to ruby?

I’m having difficulty reading python even though it is similar to Ruby.

Thank you in advance for any help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs