From 7c2a471a640c672a9283175c758ddd8d74a13cb4 Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Fri, 14 May 2021 20:04:16 +0200 Subject: [PATCH] Change rounding for rep-19a to two decimals --- ex3/rep-19.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex3/rep-19.py b/ex3/rep-19.py index 0d6cc14..4f4cfbd 100644 --- a/ex3/rep-19.py +++ b/ex3/rep-19.py @@ -16,7 +16,7 @@ packets_percentage_proto = ((df_proto['6 · # Packets'].sum() + # Calculate ratio of packets from all other protocols packets_percentage_others = 100 - packets_percentage_proto -print('Percentage of "others" from all protocols: ', round(packets_percentage_others, 1)) +print('Percentage of "others" from all protocols: ', round(packets_percentage_others, 2)) # Calculate percentage of unique source IPs with 1 (ICMP), 6 (TCP) or 17 (UDP) protocols uIPs_percentage_proto = ((df_proto['6 · # Unique Source IPs'].sum() +