From aa438bcb283f8601c6b290f672f1ef75f1316597 Mon Sep 17 00:00:00 2001 From: shany092 Date: Tue, 6 Aug 2024 14:50:04 +0500 Subject: [PATCH] Update Plus_Minus.py --- HackerRank-Plus Minus/Plus_Minus.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/HackerRank-Plus Minus/Plus_Minus.py b/HackerRank-Plus Minus/Plus_Minus.py index 99e0b18..5d25998 100644 --- a/HackerRank-Plus Minus/Plus_Minus.py +++ b/HackerRank-Plus Minus/Plus_Minus.py @@ -18,9 +18,13 @@ def plusMinus(arr): neu+=1 else: neg+=1 - print(pos/len(arr)) - print(neg/len(arr)) - print(neu/len(arr)) + # print(pos/len(arr)) + # print(neg/len(arr)) + # print(neu/len(arr)) + # you can use round(var,6) to get the decimal up to 6 places + print(round(pos/len(arr),6)) + print(round(neg/len(arr),6)) + print(round(neu/len(arr),6)) if __name__ == '__main__': n = int(input()) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy