FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python_Basics/python_programs/sum2nums_argparse.py at master · learnbyexample/Python_Basics · GitHub
This repository was archived by the owner on Dec 29, 2020. It is now read-only.
learnbyexample
/
Python_Basics
Public archive
Notifications
You must be signed in to change notification settings
Fork
196
Star
614
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Python_Basics
/
python_programs
/
sum2nums_argparse.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (8 loc) · 307 Bytes
Breadcrumbs
Python_Basics
/
python_programs
/
sum2nums_argparse.py
Copy path
File metadata and controls
11 lines (8 loc) · 307 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python3
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'num1'
,
type
=
int
,
help
=
"first number"
)
parser
.
add_argument
(
'num2'
,
type
=
int
,
help
=
"second number"
)
args
=
parser
.
parse_args
()
total
=
args
.
num1
+
args
.
num2
print
(
"{} + {} = {}"
.
format
(
args
.
num1
,
args
.
num2
,
total
))
Back
|
FazBrowse Home
|
New Git URL