From 38d2028997c4b9d5d6482d6aa16a7af07f3d101c Mon Sep 17 00:00:00 2001 From: Sayani brahmachary <147091298+Sayanibrahmachary@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:15:36 +0530 Subject: [PATCH] Create dictionary max and min values.py --- dictionary max and min values.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dictionary max and min values.py diff --git a/dictionary max and min values.py b/dictionary max and min values.py new file mode 100644 index 00000000..8af0119d --- /dev/null +++ b/dictionary max and min values.py @@ -0,0 +1,19 @@ +my={ + 3:1, + 1:3, + 2:4 +} +for s in my.values(): + s1=s + break +print("The minimum number is:",end="") +for d in my.values(): + if(d<=s1): + s1=d +print(s1) +print("The maximum number is:",end="") +for d in my.values(): + if(d>s1): + s1=d +print(s1) +