1. 학습한 내용
① HTML 유튜브 영상 퍼가기
② HTML 카카오맵 지도 퍼가기
③ Bootstrap
- jsDelivr
- CDN
- 사용 예
<head>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous">
</script>
</head>
<body class="container">
<div class="btn-group" role="group" aria-label="Basic example">
<a href="/create/" class="btn btn-primary">create</a>
<a href="/update/" class="btn btn-primary">update</a>
</div>
<a href="/delete/" class="btn btn-danger">delete</a>
<br><br>
</body>
④ if 문
print(1)
if True:
print(2.1)
else:
print(2.2)
print(4)
if input('아이디를 입력해주세요. ') == 'egoing' and input('비밀번호를 입력해주세요. ') == '1234':
print('안녕하세요')
else:
print('뉘슈?')
⑤ Loop & List & Dictionary
members = [
{'name': 'egoing', 'city': 'seoul', 'job': 'programmer'},
{'name': 'duru', 'city': 'daegu', 'job': 'dba'}
]
for member in members:
for item in member:
print(f'{item} = {member[item]}')
⑥ 함수
def sum(left, right):
return left + right
print(sum(10, 20))
⑦ 구구단 Quiz
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>구구단</title>
</head>
<body class="container" style="padding: 50px;">
<script>
function quiz(btn) {
if (prompt(btn.value) === btn.className)
btn.style.backgroundColor = 'lightblue';
else
btn.style.backgroundColor = 'lightpink';
}
var tag = '';
for (var i = 2; i < 10; i++) {
for (var j = 1; j < 10; j++)
tag += `<input class="${i * j}" type="button" value="${i} * ${j}">`
tag += '<br/>'
}
document.write(tag);
</script>
</body>
</html>
import random
def quiz(x = random.randint(1, 9), y = random.randint(2, 9)):
gugudan = [[x * y for x in range(0, 10)] for y in range(0, 10)]
if int(input(f'{x}*{y} = ')) == gugudan[x][y]:
print('정답입니다')
else:
print('틀렸습니다.')
quiz()
2. 학습내용 중 어려웠던 점
3. 해결방법
4. 학습소감
- 유명한 생활코딩의 이고잉 강사님의 강의 내용을 들을 수 있어서 영광입니다.