From a10799cdf4f88eced1dd9a1e29143675f70a0a0c Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Thu, 19 Jul 2018 01:55:22 -0700 Subject: [PATCH 1/3] implement pounds2kg --- conversion.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conversion.py b/conversion.py index 4a1965d..350fedb 100644 --- a/conversion.py +++ b/conversion.py @@ -9,3 +9,8 @@ def gallons2liters(gallons): """Convert gallons to liters""" liters = gallons * 3.785 return liters + +def pounds2kg(pounds): + """Convert pounds to Kg""" + kilograms = pounds / 2.2 + return kilograms From c9e44bdf80e789cc95104c6096e6e957af54e5a8 Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Thu, 19 Jul 2018 01:57:55 -0700 Subject: [PATCH 2/3] attempt to fix bug --- conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conversion.py b/conversion.py index 350fedb..4f506bb 100644 --- a/conversion.py +++ b/conversion.py @@ -7,7 +7,7 @@ def dollars2cents(dollars): def gallons2liters(gallons): """Convert gallons to liters""" - liters = gallons * 3.785 + liters = gallons * 3.7854 return liters def pounds2kg(pounds): From 958577723ed7697319b22c9b9cfc355327088232 Mon Sep 17 00:00:00 2001 From: Kim Thomas Date: Mon, 2 Aug 2021 11:16:24 -0700 Subject: [PATCH 3/3] Rever "remove extra digits" This reverts commit 363a5723a33f65afa189ea643fa04a39327bf0c4. --- conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conversion.py b/conversion.py index 4f506bb..b6a4371 100644 --- a/conversion.py +++ b/conversion.py @@ -7,7 +7,7 @@ def dollars2cents(dollars): def gallons2liters(gallons): """Convert gallons to liters""" - liters = gallons * 3.7854 + liters = gallons * 3.78541 return liters def pounds2kg(pounds):