From 025068fb792b3bc951074f163a9c21bc7b686b90 Mon Sep 17 00:00:00 2001 From: Abhishek Veeramalla Date: Wed, 8 Nov 2023 19:26:12 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 884680f0..0216ba62 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,7 @@ - Example: Automating a log file analysis with a loop to find errors. ## Day 10: Working with Lists (Part 2) -- List comprehensions. -- Nested lists and advanced list operations. +- Advanced list operations. - Practice exercises and examples: - Example: Print list of files in the list of folders provided From 66664533b22774dff1572e7aa62b99dd3af1e0f2 Mon Sep 17 00:00:00 2001 From: dhirendra <133599653+taankdhirendra@users.noreply.github.com> Date: Wed, 29 Nov 2023 05:40:14 +0530 Subject: [PATCH 2/2] Create task SYS and OS --- Day-05/task SYS and OS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Day-05/task SYS and OS diff --git a/Day-05/task SYS and OS b/Day-05/task SYS and OS new file mode 100644 index 00000000..13dd3e07 --- /dev/null +++ b/Day-05/task SYS and OS @@ -0,0 +1,39 @@ +import sys +import os +def add(num1,num2): + return(num1+num2) + +def sub(num1,num2): + if(num1>num2): + return(num1-num2) + else: + return(num2-num1) +def mult(num1,num2): + return(num1*num2) +def div(num1,num2): + if(num2==0): + print("Division by zero error!") + else: + return(num1/num2) +num1=float(sys.argv[1]) +oper=str(sys.argv[2]) +num2=float(sys.argv[3]) +print(num1,oper,num2) + +if(oper=="+"): + res=add(num1,num2) + print("Addition of two number: ",res) +elif(oper=="-"): + res=sub(num1,num2) + print("Subtraction of two number: ",res) +elif(oper=="x"): + res=mult(num1,num2) + print("Multiplication of two number: ",res) +elif(oper=="/"): + res=div(num1,num2) + print("Division of two number: ",res) +else: + print("You have enter wrong input") + +for key in os.environ: + print(key,"->",os.environ[key])