diff --git a/docs/12_ko.html b/docs/12_ko.html index e47e64e370dce15bd0a31c12a8567763c06e0d6c..77054351d5c089392971e225f43a8ea698955287 100644 --- a/docs/12_ko.html +++ b/docs/12_ko.html @@ -39,7 +39,9 @@ <p>Rust는 숫자 변수 타입에 대해 알고 있어야하며, <code>u8</code>를 <code>u32</code>로 쉽게 사용할 수 없습니다.</p> <p>다행히 Rust는 <strong>as</strong> 키워드를 사용하여 숫자형을 쉽게 변환할 수 있습니다.</p> <p>또는 <code>parse</code>를 자주 사용합니다.</p> -<pre><code class="rust">let my_string = "42"; let my_integer = my_string.parse::<i32>().unwrap(); // double colon op, ::<i32> syntax tells the compiler to parse the string as an i32 type</code></pre> +<pre><code class="rust">let my_string = "42"; +let my_integer = my_string.parse::<i32>().unwrap(); +// double colon op, ::<i32> syntax tells the compiler to parse the string as an i32 type</code></pre> <div class="bottomnav"> <span class="back"><a href="11_ko.html" rel="prev">❮ 이전</a></span> <span class="next"><a href="13_ko.html" rel="next">다음 ❯</a></span> diff --git a/docs/15_ko.html b/docs/15_ko.html index 2d12157bae04c106bbea0b2ce5a5afffac006f2f..0d2b49df971bf856062bca4bf050ecf7dad42ec7 100644 --- a/docs/15_ko.html +++ b/docs/15_ko.html @@ -42,20 +42,17 @@ <p>함수 이름은 항상 <code>snake_case</code>로 지정됩니다.</p> <p>힌트: 함수를 정의하는 경우, 해당 함수가 수신하는 데이터를 매개변수 (parameter)라고합니다.<br /> 그 함수를 호출하고 데이터를 전달하면 인수(argument)라고합니다.</p> -<pre><code class="python language-python">def add(x: int, y: int) -> int: - return x + y - -def subtract(x: int, y: int) -> 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> +<p>```python # 파이썬으로 보면<br /> +def add(x: int, y: int) -> int:<br /> + return x + y</p> +<p>def subtract(x: int, y: int) -> 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> <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> diff --git a/frontend/lessons/ko/chapter_1.yaml b/frontend/lessons/ko/chapter_1.yaml index f9b111f1cb9ff47c5fd9405c4fbbceefd7c87618..2c378e1fa3c06e62c0da2d7652f4aeefc377ab7b 100644 --- a/frontend/lessons/ko/chapter_1.yaml +++ b/frontend/lessons/ko/chapter_1.yaml @@ -283,8 +283,11 @@ %rust% let my_string = "42"; + let my_integer = my_string.parse::<i32>().unwrap(); + // double colon op, ::<i32> syntax tells the compiler to parse the string as an i32 type + %end% - title: Constants code: >- @@ -340,6 +343,7 @@ ```python + # 파이썬으로 보면 def add(x: int, y: int) -> int: return x + y