Exercise: Hash

Let's solve some exercises on hashes before moving onto the next chapter.

Problem Statement #1

Using the hash below, write a program that transforms the hash to Moon conditions. It’s known that the same weight on the Moon is six times less than the same weight on Earth:

obj = {
  soccer_ball: 410,
  tennis_ball: 58,
  golf_ball: 45
}

Write your code in the widget below.

Get hands-on with 1400+ tech skills courses.