How to create the dictionary for below question

  dictionary, lambda, python-3.x

A dictionary of names and their weights on earth is given. Find how much they will weigh on the moon. (use map and lambda functions) Weight of people in kg WeightOnEarth = {‘John’:45, ‘Shelly’:65, ‘Marry’:35} Gravitational force on the Moon GMoon = 1.622 Gravitational force on the Earth GEarth = A dictionary of names and their weights on earth is given. Find how much they will weigh on the moon. (use map and lambda functions) Weight of people in kg WeightOnEarth = {‘John’:45, ‘Shelly’:65, ‘Marry’:35} Gravitational force on the Moon GMoon = 1.622 Gravitational force on the Earth GEarth = 9.81

Output: Weight on Moon: {‘John’: 7.44, ‘Shelly’: 10.75, ‘Marry’: 5.79}

Source: Python-3x Questions

LEAVE A COMMENT