From 2338b52ece61eb5fcd3194aef4f90f78cdb0f6b3 Mon Sep 17 00:00:00 2001 From: Nikita Choudhari <97299411+ChoudhariNikita@users.noreply.github.com> Date: Tue, 18 Jan 2022 19:54:35 +0530 Subject: [PATCH] One more method to round up values. --- beginner_python/01-numbers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beginner_python/01-numbers.py b/beginner_python/01-numbers.py index 67fb283..19113e2 100644 --- a/beginner_python/01-numbers.py +++ b/beginner_python/01-numbers.py @@ -26,6 +26,9 @@ #You can use round instead. print(round(20/3), 0) +#Round up values to integer +print(2//4) # Here actual answer 0.5 --> after rounding up answer is 0 + print(result / age) #can use variables in place of literals. This will not change variable values #guess the output: