Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KimTaeeun
Python
Commits
b6379280
Commit
b6379280
authored
6 years ago
by
KimTaeeun
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
84069cab
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
파이썬6_함수.py
+62
-0
62 additions, 0 deletions
파이썬6_함수.py
with
62 additions
and
0 deletions
파이썬6_함수.py
0 → 100644
+
62
−
0
View file @
b6379280
def
hello
():
print
(
"
hello world
"
)
print
(
"
my name is taeeun
"
)
def
add
(
a
,
b
):
sums
=
a
+
b
return
sums
def
minus
(
a
):
a
=
-
a
return
a
def
minus2
(
a
):
#이거는 안바뀜
a
=-
a
def
minuslist
(
l
):
#이거는 바뀜
l
[
0
]
=
20
hello
()
a
=
675
b
=
754
k
=
add
(
a
,
b
)
print
(
"
입력값의 합은
"
)
print
(
k
)
print
(
"
\n
"
)
print
(
minus
(
a
))
print
(
minus2
(
a
))
print
(
"
\n
"
)
l
=
[
1
,
2
]
print
(
l
)
minuslist
(
l
)
print
(
l
)
print
(
"
\n
"
)
def
print_personnel
(
name
=
'
김태은
'
,
position
=
'
student
'
,
nationality
=
'
Korea
'
):
print
(
'
name = {0}
'
.
format
(
name
))
print
(
'
position = {0}
'
.
format
(
position
))
print
(
'
nationality = {0}
'
.
format
(
nationality
))
print_personnel
(
name
=
'
박상현
'
)
print
(
"
\n
"
)
print_personnel
(
name
=
'
박상현
'
,
nationality
=
'
Japan
'
)
print
(
"
\n
"
)
print_personnel
(
position
=
'
인턴
'
)
print
(
"
\n
"
)
def
fl
(
*
a
):
for
x
in
a
:
print
(
type
(
x
),
x
)
print
(
fl
((
1
,
2
,
3
),
456
,
"
김태은
"
,{
'
a
'
:
'
taeeun
'
}))
print
(
"
\n
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment