-
1 minute read
νμ/μ§μ μΆλ ₯νκΈ° def oddEven(num): if num % 2 == 0: print("μ§μ") else: print("νμ") oddEven(5) oddEven(10) ### μΆλ ₯κ²°κ³Ό ### νμ ### μ§μ μ λκ° μΆλ ₯νκΈ° def abs(num): if(num>0): res = num else: res = num * -1 return res # return λ§λλ μ¦μ ν¨μ μ’
λ£ print(abs(-15)) print(abs(16)) ### μΆλ ₯κ²°κ³Ό ### 15 ###...
Continue reading...
-
1 minute read
ν¨μ ν¨μλ? μ
λ ₯κ°μλ°μμμΆλ ₯κ°μλ΄μ΄λλκ² μ
λ ₯ => [ν¨μ] => μΆλ ₯ κΈ°λ³Ένν def ν¨μλͺ
(맀κ°λ³μ): μνν λ¬Έμ₯1 μνν λ¬Έμ₯2 ... *args / **kwargs 맀κ°λ³μ(parameter) / μΈμ(arguments) 맀κ°λ³μ : ν¨μμ μ
λ ₯μΌλ‘ μ λ¬λ κ°μ λ°λ λ³μ μΈμ : ν¨μλ₯Ό νΈμΆν λ μ λ¬νλ μ
λ ₯κ° def add(a, b) # 맀κ°λ³μ return a + b print(add(1, 2)) # μΈμ...
Continue reading...
-
1 minute read
λ¬Έμμ μ«μμ λμ μ°μ° κ²°κ³Ό μΆλ ₯νκΈ° See the Pen λ¬Έμ / μ«μ λμ μΆλ ₯ by Jinsol (@losuif) on CodePen. HTML <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>μ°μ°κ³Ό μ°κ²° : λ¬Έμ/μ«μ λμ </title> <link rel="stylesheet" href="style/style.css"> </head> <body> <div id="wrap"> <h1>λ¬Έμ/μ«μμ λμ κ²°κ³Ό μΆλ ₯</h1>...
Continue reading...
-
1 minute read
μν κ°κ²© κ³μ° νλ‘κ·Έλ¨ λ§λ€κΈ° 2 See the Pen μν κ°κ²© κ³μ° νλ‘κ·Έλ¨ 2 by Jinsol (@losuif) on CodePen. html <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>μν κ°κ²© κ³μ° 2</title> <link rel="stylesheet" href="style/style.css"> <script src="script/script.js"></script> </head> <body> <div id="wrap"> <h1>μν κ°κ²© κ³μ°...
Continue reading...
-
2 minute read
μν κ°κ²© κ³μ° νλ‘κ·Έλ¨ λ§λ€κΈ° See the Pen μν κ°κ²© κ³μ° νλ‘κ·Έλ¨ by Jinsol (@losuif) on CodePen. html <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>μν κ°κ²© κ³μ°</title> <link rel="stylesheet" href="style/style.css"> </head> <body> <div id="wrap"> <h1>μν κ°κ²© κ³μ°</h1> <fieldset> <!-- fieldsetμ ν
λ리μ λ§λ€...
Continue reading...