Skip to content
Snippets Groups Projects
Commit 00e5eabb authored by Alfex4936's avatar Alfex4936
Browse files

Fix python

parent 3f85cbde
No related branches found
No related tags found
No related merge requests found
Pipeline #6459 passed
......@@ -42,17 +42,21 @@
<p>함수 이름은 항상 <code>snake_case</code>로 지정됩니다.</p>
<p>힌트: 함수를 정의하는 경우, 해당 함수가 수신하는 데이터를 매개변수 (parameter)라고합니다.<br />
그 함수를 호출하고 데이터를 전달하면 인수(argument)라고합니다.</p>
<p>```python # 파이썬으로 보면<br />
def add(x: int, y: int) -&gt; int:<br />
return x + y</p>
<p>def subtract(x: int, y: int) -&gt; int:<br />
return x - y</p>
<p>def main():<br />
print(f"42 + 13 = {add(42, 13)}")<br />
print(f"42 - 13 = {subtract(42, 13)}")</p>
<p>if <strong>name</strong> == "<strong>main</strong>":<br />
main()<br />
```</p>
<pre><code class="python language-python"># 파이썬으로 보면
def add(x: int, y: int) -&gt; int:
return x + y
def subtract(x: int, y: int) -&gt; int:
return x - y
def main():
print(f"42 + 13 = {add(42, 13)}")
print(f"42 - 13 = {subtract(42, 13)}")
if __name__ == "__main__":
main()
</code></pre>
<div class="bottomnav">
<span class="back"><a href="14_ko.html" rel="prev">❮ 이전</a></span>
<span class="next"><a href="16_ko.html" rel="next">다음 ❯</a></span>
......
......@@ -343,6 +343,7 @@
```python
# 파이썬으로 보면
def add(x: int, y: int) -> int:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment