Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92306537
hello-exo2.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 19, 06:36
Size
422 B
Mime Type
text/x-c
Expires
Thu, Nov 21, 06:36 (2 d)
Engine
blob
Format
Raw Data
Handle
22416422
Attached To
R7571 SP4E-TB-TL-FR
hello-exo2.py
View Options
import
sys
import
series
def
main
():
if
(
not
len
(
sys
.
argv
)
==
2
):
print
(
"Not enough parameters for the program {0}"
.
format
(
sys
.
argv
[
0
]))
return
print
(
"sys.argv is of type {0}"
.
format
(
type
(
sys
.
argv
)))
prog_name
=
sys
.
argv
[
0
]
N
=
int
(
sys
.
argv
[
1
])
print
(
"{0} says: Hello {1} {2}"
.
format
(
prog_name
,
series
.
computeSeries
(
N
),
N
*
(
N
+
1
)
/
2
))
if
__name__
==
'__main__'
:
main
()
Event Timeline
Log In to Comment