์ „์ฒด ๊ธ€

Python, C++, Data Science ๊ณต๋ถ€ ๋ธ”๋กœ๊ทธ ์ž…๋‹ˆ๋‹ค.
ยทpython
๋ฐฉ๋ฒ• 1 - Clear Previous Output option vscode ์‚ฌ์šฉ์‹œ code runner extension์„ ์ฃผ๋กœ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋Š”๋ฐ, ํŒŒ์ผ์„ ๋ฐ˜๋ณต์ ์œผ๋กœ ์‹คํ–‰ํ•˜๋‹ค ๋ณด๋ฉด ํ„ฐ๋ฏธ๋„์ด ์ง€์ €๋ถ„ํ•˜๊ณ  ๋ณต์žกํ•ด์ ธ์„œ ๊ฐ€๋…์„ฑ์ด ๋–จ์–ด์ง€๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์ด๋Ÿด ๋•Œ ํŒŒ์ผ์„ ์‹คํ–‰ํ•  ๋•Œ ๋งˆ๋‹ค ํ„ฐ๋ฏธ๋„์„ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ๋ฐฉ๋ฒ•์ผ ์ˆ˜ ์žˆ๋‹ค. 1. vscode ์„ค์ •์œผ๋กœ ๊ฐ„๋‹ค (โŒ˜ + ,) 2. ๊ฒ€์ƒ‰์ฐฝ์— 'Clear Previous Output'์„ ์ž…๋ ฅํ•œ๋‹ค 3. Code-runner: Clear Previous Output ๋ฐ•์Šค๋ฅผ ์ฒดํฌํ•œ๋‹ค. ์ฒดํฌ ์™„๋ฃŒ ํ›„, ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ธฐ์กด ํ„ฐ๋ฏธ๋„์ด ์ดˆ๊ธฐํ™”๋œ ์ดํ›„์— ์ถœ๋ ฅ๋œ๋‹ค. ๋ฐฉ๋ฒ• 2 - settings.json ์ˆ˜์ • ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜๋‹ค. ์ด ๋ฐฉ๋ฒ•์€ ์ถœ๋ ฅ ์‹œ outp..
ยทpython
Turtle graphics Module์„ ์‚ฌ์šฉํ•ด์„œ ๋ฑ€ ๊ฒŒ์ž„์„ ๋งŒ๋“ค์–ด๋ณด์ž. ๋จน์ด๋ฅผ ๋จน์œผ๋ฉด ๊ผฌ๋ฆฌ๊ฐ€ ํ•œ ์นธ์”ฉ ์ž๋ผ๊ณ , ๊ผฌ๋ฆฌ๋‚˜ ์ฐฝ ๋์— ๋ถ€๋”ชํžˆ๋ฉด ์ฃฝ๋Š” ๊ฒŒ์ž„์ด๋‹ค. main.py, snake.py, scoreBoard.py, food.py ์ด 4๊ฐ€์ง€ ํŒŒ์ผ๋กœ ์ด๋ฃจ์–ด์ ธ ์žˆ๋‹ค. # main.py import time from turtle import Screen, Turtle from snake import Snake from food import Food from scoreBoard import ScoreBoard screen = Screen() screen.setup(width=600, height=600) screen.bgcolor("black") screen.title("Snake Game") screen.tr..
ยทhtml.css
css positioning์—๋Š” static, relative, absolute, fixed๊ฐ€ ์žˆ๋‹ค. ๋‹ค์Œ ๋งํฌ๊ฐ€ ์ดํ•ด์— ๋„์›€์„ ์ค„ ์ˆ˜ ์žˆ๋‹ค appbrewery.github.io/css-positioning/ style="position = positioning;"์œผ๋กœ ์ ์šฉ 1. Static html ๊ธฐ๋ณธ๊ฐ’ ์ด์ „ ์š”์†Œ์˜ ์•„๋ž˜๋กœ ๋ฐฐ์น˜๋จ 2. Relative ๊ธฐ๋ณธ ์œ„์น˜๋ฅผ ๊ธฐ์ค€์œผ๋กœ ๋ฐฐ์น˜ 3. Absolute ๋ถ€๋ชจ ํƒœ๊ทธ๋ฅผ ๊ธฐ์ค€์œผ๋กœ relative ๋ฐฐ์น˜ ๋ถ€๋ชจ ํƒœ๊ทธ๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์„ ์‹œ ํ™”๋ฉด ์ขŒ์ธก์ƒ๋‹จ์— ๋ฐฐ์น˜ z-index๋ฅผ ์ตœ ์ƒ๋‹จ์œผ๋กœ ๋ณด์ด๊ธฐ ๋•Œ๋ฌธ์—, z index๋ฅผ -๋กœ ๋ฐ”๊พธ์–ด์•ผ ํ•  ์ˆ˜ ์žˆ์Œ 4. Fixed ๋ธŒ๋ผ์šฐ์ € ์ฐฝ ์ขŒ์ธก์ƒ๋‹จ์„ ๊ธฐ์ค€์œผ๋กœ relative ๋ฐฐ์น˜ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์ƒํ•˜๋กœ ์›€์ง์—ฌ๋„ ํ•ญ์ƒ ๊ฐ™์€ ์œ„์น˜์— ์กด์žฌ ๋‹ค์Œ..
ยทhtml.css
css๋ฅผ ์ž‘์„ฑํ•˜๋‹ค๋ณด๋ฉด, ์–‘์ด ๋Š˜์–ด๋‚  ์ˆ˜๋ก internal style sheet๋กœ ์ž‘์„ฑํ•˜๊ธฐ ํž˜๋“ค์–ด์ง„๋‹ค. ๊ทธ๋Ÿด ๋•Œ id๋‚˜ class๋ฅผ ๋ถ€์—ฌํ•˜๋Š” ๋“ฑ์˜ ๋ฐฉ๋ฒ•์œผ๋กœ ํƒœ๊ทธ๋“ค์„ ๋ถ„๋ฅ˜ํ•œ ํ›„, css์—์„œ ์Šคํƒ€์ผ์„ ์ž…ํžŒ๋‹ค. ์ด ๋•Œ, ๋ถ€์—ฌํ•œ ํŠน์ • id, class, ํ˜น์€ ํŠน์ • ํƒœ๊ทธ ์ข…๋ฅ˜๋“ค์—๊ฒŒ ์Šคํƒ€์ผ์„ ๋ถ€์—ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ด css selectors(์„ ํƒ์ž)์ด๋‹ค. ๊ธฐ๋ณธ css ์„ ํƒ์ž์—๋Š” 4๊ฐ€์ง€ ์ข…๋ฅ˜๊ฐ€ ์žˆ๋‹ค. ํƒœ๊ทธ ์ข…๋ฅ˜ ์„ค๋ช… ๋ฌธ๋ฒ• Universal Selector ์ „์ฒด ์„ ํƒ์ž ์ „์ฒด ์„ ํƒ *{...} Type Selector ํƒ€์ž… ์„ ํƒ์ž ํƒœ๊ทธ ์ข…๋ฅ˜๋กœ ์„ ํƒ ํƒœ๊ทธ์ด๋ฆ„{...} ex) h1{...}, p{...} Class Selector ํด๋ž˜์Šค ์„ ํƒ์ž ๋ถ€์—ฌํ•œ ํด๋ž˜์Šค๋กœ ์„ ํƒ .ํด๋ž˜์Šค์ด๋ฆ„{...} ex) .imagebox{...} ID Sele..
Chan Lee
Chan Code & DS ๐Ÿง‘‍๐Ÿ’ป๐Ÿ“Š