From a10799cdf4f88eced1dd9a1e29143675f70a0a0c Mon Sep 17 00:00:00 2001 From: Andrea Zonca Date: Thu, 19 Jul 2018 01:55:22 -0700 Subject: [PATCH 1/2] 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 1795ca5bcfb962cc7aa57ef1c477236778045910 Mon Sep 17 00:00:00 2001 From: Rebecca Gjini Date: Mon, 2 Aug 2021 11:45:41 -0700 Subject: [PATCH 2/2] Revert "remove extra digits" This reverts commit 363a5723a33f65afa189ea643fa04a39327bf0c4. "remove extra digits"# --- conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conversion.py b/conversion.py index 350fedb..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.785 + liters = gallons * 3.78541 return liters def pounds2kg(pounds):