File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,7 @@ example:
77 python3 cmd.py --physics 60 --chemistry 70 --maths 90
88```
99
10- 2 . find PCM(physics chemistry maths) Merit(Average) using command line input of marks
11-
12- ```
13- -take input
14- -do sum of marks
15- -take average
16-
17- ```
18-
10+ 2 . Find average marks for the three subjects using command line input of marks.
1911
2012
2113[ Solution] ( https://github.com/codebasics/py/blob/master/Basics/python_basics/24_argparse/24_argparse.py )
Original file line number Diff line number Diff line change 1212 print (args .chemistry )
1313 print (args .maths )
1414
15-
15+ print ("Result:" , (
16+ int (args .physics ) + int (args .chemistry ) + int (args .maths )
17+ ) / 3 )
1618
17- print ("Result:" ,(int (args .physics )+ int (args .chemistry )+ int (args .maths ))/ 3 )
18-
19-
20- #python3 cmd.py --physics 60 --chemistry 70 --maths 90
19+ # python3 cmd.py --physics 60 --chemistry 70 --maths 90
You can’t perform that action at this time.
0 commit comments