no image
[고1 프로그래밍] 11 - (1)
# 일반 유닛 class Unit: def __init__(self, name, hp, speed): self.name = name self.hp = hp self.speed = speed def move(self, location): print("[지상 유닛 이동]") print("{0} : {1} 방향으로 이동합니다. [속도 : {2}]"\ .format(self.name, location, self.speed)) # 메딕 : 의무병(공격력 없음, 사람으로 된 유니싱 다쳤을 때 치료해주어 체력을 회복시켜 줌) # 공격 유닛 class AttackUnit(Unit): def __init__(self, name, hp, speed, damage): Unit.__init__(self, name, hp, s..
2023.11.08
no image
[고1 화면구현] 10 - (4)
1 Who am I? 프런트엔드 웹 기술(Front-end Web Tech.)에 관심이 많습니다. 현재 제주의 한 시골 마을에서 코딩 중입니다. 2 Who am I? 프런트엔드 웹 기술(Front-end Web Tech.)에 관심이 많습니다. 현재 제주의 한 시골 마을에서 코딩 중입니다. style.css h2 { color : blue; } p { font-size:0.9em; line-height: 2.0; } 3 블루베리와 항산화 효능 블루베리는 항산화제인 안토시아닌과 폴리페놀을 다량 포함하고 있습니다. 매사츄세츠 보스톤에 있는 USDA 노화에 관한 인류 영양 연구센터 (the USDA Human Nutrition Research Center on Aging) 의 자료에 의하면 블루베리는 과일 중에..
2023.10.26
no image
[고1 국어] 2학기 1차 지필평가
[한글 맞춤법의 원리와 내용] 제1항 표준어를 ‘소리대로’ 적는다. + 어법에 맞도록 한다. ('하늘', '오리', '날다') 제2항 단어를 단위로 하여 띄어 쓴다. 다만 조사는 앞말에 붙여 쓴다. ('나 물 좀 줘.', '나는 너를 좋아해.') 제19항 어간에 '-이'나 '-음/-ㅁ'이 붙어 명사로 된 것과 '-이'나 '-히'가 붙어서 부사로 된 것은 어간의 원형을 밝히어 적는다. (다듬다 ➜ 다듬이) 제19항 [붙임] 이외는 어간의 원형을 밝히어 적지 않는다. (맞다 ➜ 마중) 제20항 명사에 '-이'가 붙어서 된 말은 명사의 원형을 밝히어 적는다. (낱낱 ➜ 낱낱이) 제20항 [붙임] 이외는 명사의 원형을 밝히어 적지 않는다. (잎 ➜ 이파리) 제41항 조사는 앞말에 붙여 쓴다. (꽃을, 꽃밖에, ..
2023.10.19
no image
[고1 화면구현] 10 - (3)
상대 배치, relative h와 k글자에 마우스를 올려 보세요. T h a n k s ​ span 태그를 display:block으로 block span과 block span입니다. div를 display : inline으로 inline DIV inline DIV inline DIV span을 display:block으로 inline DIV inline DIV inline DIV 인라인, 인라인 블록, 블록 나는 div(none)입니다. 나는 div 나는 div 나는 divspan(block)입니다.
2023.10.19
no image
[고1 게임엔진] 10 - (3)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Sometimes_RandomPrefab : MonoBehaviour { public GameObject newPrefab; // 만드는 프리팹 :Inspector에 지정한다 public float intervalSec = 1; // 작성 간격(초):Inspector로에 지정한다 void Start() { // 처음에 시행한다 // 지정 초 수마다 CreatePrefab를 반복 실행하는 예약 InvokeRepeating("CreatePrefab", intervalSec, intervalSec); } void CreatePrefab() { //..
2023.10.18
no image
[고1 프로그래밍] 10 - (2)
class Monster: def __init__(self, name, age): self.name = name self.age = age def say(self): print(f"나는 {self.name} {self.age}살임") shark = Monster("상어", 7) wolf = Monster("늑대", 5) dog = Monster("강아지", 4) shark.say() wolf.say() dog.say() class Unit: def __init__(self, name, hp): self.name = name self.hp = hp class AttackUnit(Unit): def __init__(self, name, hp, damage): Unit.__init__(self, name, h..
2023.10.17
no image
[고1 게임엔진] 10 - (2)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouseDown_CreatePrefabs : MonoBehaviour { // 마우스 클릭하면 그 자리에 프리팹 생성 // 마우스 클릭한 위치보다 조금 앞쪽에 프리팹 나타나게 public GameObject newPrefab; // 프리팹(게임오브젝트) 저장 - ghost Vector3 pos; void Start() { } void Update() { if (Input.GetMouseButtonDown(0)) { // 마우스 클릭한 위치를 카메라세상안에서의 위치로 변환해서 pos = Camera.main.ScreenToWorldPoint(..
2023.10.16
no image
[고1 프로그래밍] 10 - (1)
print("Python", "Java") print("Python" + "Java") print("Python", "Java", sep=".") print("Python", "Java", "JavaScript", sep=" vs ") print("Python", "Java", sep=", ", end="?") print("무엇이 더 재미있을까요?") for num in range(1, 21): print("대기번호 :" + (str(num).zfill(3))) print("{0: >+10}".format(500)) print("{0: >+10}".format(-500)) 피보나치 def fib(n): if n==0: return 0 if n==1: return 1 return fib(n-2) + fib..
2023.10.16
no image
[고1 영어] 2학기 1차 지필평가
considerate 사려 깊은, 배려하는 supplies 보급품, 물자 remind ... of ...에게 ~을 생각나게 하다 passion 열정 in progress 진행 중인 humanity 인류, 인간성, 인간애 cast 깁스, 붕대 qualification 자격, 자질, 능력 concern 걱정, 염려, 관심, 관심사 yield 양보하다 grateful 고마워하는, 감사하는 inconvenience 불편 arrange 정리하다, 배열하다 volunteer 자원 봉사자, 자원 봉사를 하다 relief 구호, 구호물자, 안심, 완화 immigrant 이민자, 이주자 initiative (특정한 목적 달성) 계획 give ... a try ...을 한 번 해보다, 시도하다 first aid 응급 처치..
2023.10.15
# 일반 유닛
class Unit:
    def __init__(self, name, hp, speed):
        self.name = name
        self.hp = hp
        self.speed = speed

    def move(self, location):
        print("[지상 유닛 이동]")
        print("{0} : {1} 방향으로 이동합니다. [속도 : {2}]"\
                .format(self.name, location, self.speed))
        
# 메딕 : 의무병(공격력 없음, 사람으로 된 유니싱 다쳤을 때 치료해주어 체력을 회복시켜 줌)
# 공격 유닛
class AttackUnit(Unit):
    def __init__(self, name, hp, speed, damage):
        Unit.__init__(self, name, hp, speed)
        self.damage = damage

    def attack(self, location):
        print("{0} : {1} 방향으로 적군을 공격합니다.[공격력 : {2}"\
                .format(self.name, location, self.damage))
        
    def damaged(self, damage):
        print("{0} : {1} 데미지를 입었습니다.".format(self.name, damage))
        self.hp -= damage
        print("{0} : 현제 체력은 {1} 입니다.".format(self.name, self.hp))
        if self.hp <= 0:
            print("{0} : 파괴되었습니다.".format(self.name))
    
# 드랍쉽 : 공중 유닛, 수송기, 마린/파이어뱃/탱크 등을 수송. 공격 불가
# 날 수 있는 기능을 가진 클래스
class Flyable:
    def __init__(self, flying_speed):
        self.flying_speed = flying_speed

    def fly(self, name, location):
        print("{0} : {1} 방향으로 날아갑니다.[속도 : {2}]"\
                .format(name, location, self.flying_speed))
        
# 날 수 있는 공격 유닛 클래스
class FlyableAttackUnit(AttackUnit, Flyable):
    def __init__(self, name, hp, damage, flying_speed):
        AttackUnit.__init__(self, name, hp, 0, damage) # 지상 speed는 0
        Flyable.__init__(self, flying_speed)

    def move(self, location):   # move 재정의
        print("[공중 유닛 이동]")
        self.fly(self.name, location)

# 벌처 : 지상 유닛, 기동성이 좋음
vulture = AttackUnit("벌쳐", 80, 10, 20)

# 배틀크루저 : 공중 유닛, 체력이 굉장히 좋음, 공격력도 좋음
battlecruiser = FlyableAttackUnit("배틀크루저", 500, 25, 3)

vulture.move("11시")
# battlecruiser.fly("배틀크루저", "9시")
battlecruiser.move("10시")
# 일반 유닛
class Unit:
    def __init__(self, name, hp, speed):
        self.name = name
        self.hp = hp
        self.speed = speed

    def move(self, location):
        print("[지상 유닛 이동]")
        print("{0} : {1} 방향으로 이동합니다. [속도 : {2}]"\
                .format(self.name, location, self.speed))
        
# 메딕 : 의무병(공격력 없음, 사람으로 된 유니싱 다쳤을 때 치료해주어 체력을 회복시켜 줌)
# 공격 유닛
class AttackUnit(Unit):
    def __init__(self, name, hp, speed, damage):
        Unit.__init__(self, name, hp, speed)
        self.damage = damage

    def attack(self, location):
        print("{0} : {1} 방향으로 적군을 공격합니다.[공격력 : {2}"\
                .format(self.name, location, self.damage))
        
    def damaged(self, damage):
        print("{0} : {1} 데미지를 입었습니다.".format(self.name, damage))
        self.hp -= damage
        print("{0} : 현제 체력은 {1} 입니다.".format(self.name, self.hp))
        if self.hp <= 0:
            print("{0} : 파괴되었습니다.".format(self.name))
    
# 드랍쉽 : 공중 유닛, 수송기, 마린/파이어뱃/탱크 등을 수송. 공격 불가
# 날 수 있는 기능을 가진 클래스
class Flyable:
    def __init__(self, flying_speed):
        self.flying_speed = flying_speed

    def fly(self, name, location):
        print("{0} : {1} 방향으로 날아갑니다.[속도 : {2}]"\
                .format(name, location, self.flying_speed))
        
# 날 수 있는 공격 유닛 클래스
class FlyableAttackUnit(AttackUnit, Flyable):
    def __init__(self, name, hp, damage, flying_speed):
        AttackUnit.__init__(self, name, hp, 0, damage) # 지상 speed는 0
        Flyable.__init__(self, flying_speed)

    def move(self, location):   # move 재정의
        print("[공중 유닛 이동]")
        self.fly(self.name, location)

# 건물
class BuildingUnit(Unit):
    def __init__(self, name, hp, location):
        pass

# 서플라이 디폿 : 건물, 1개 건물 = 8유닛
supply_depot = BuildingUnit("서플라이디폿", 500, "7시")

def game_start():
    print("[알림] 게임을 시작합니다.")

def game_over():
    pass

game_start()
game_over()

1

<!DOCTYPE html>
<html>
    <head>
        <style>
            section {
                width:500px;
                padding:15px;
                border:5px solid gray;
            }
        </style>
    </head>
    <body>
        <section>
            <h2>Who am I?</h2>
            <p>프런트엔드 웹 기술(Front-end Web Tech.)에 관심이 많습니다.<br>
                현재 제주의 한 시골 마을에서 코딩 중입니다.</p>
        </section>
    </body>
</html>

 

2

<!DOCTYPE html>
<html>
    <head>
        <style>
            section {
                width:500px;
                padding:15px;
                border:5px solid gray;
            }
        </style>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <section>
            <h2>Who am I?</h2>
            <p>프런트엔드 웹 기술(Front-end Web Tech.)에 관심이 많습니다.<br>
                현재 제주의 한 시골 마을에서 코딩 중입니다.</p>
        </section>
    </body>
</html>

style.css

h2 {
    color : blue;
}

p {
    font-size:0.9em;
    line-height: 2.0;
}


3

<!DOCTYPE html>
<html>
    <body>
        <h1>블루베리와 항산화 효능</h1>
        <p style="color:blue;">블루베리는 항산화제인 안토시아닌과 폴리페놀을 다량 포함하고 있습니다.</p>
        <p>매사츄세츠 보스톤에 있는 USDA 노화에 관한 인류 영양 연구센터 (the USDA Human Nutrition Research Center on Aging) 의 자료에 의하면
            블루베리는 과일 중에서 가장 항산화 작용이 뛰어난 과일이라고 합니다.</p>
    </body>
</html>

 

4

<!DOCTYPE html>
<html>
    <head>
        <style>
            h2 {
                color:blue;
            }
            p {
                font-size:12px;
                margin-left:20px;
            }
        </style>
    </head>
    <body>
        <h1>블루베리에 관한 연구</h1>
        <h2>블루베리와 항산화 효능</h2>
        <p>블루베리는 항산화제인 안토시아닌과 폴리페놀을 다량 포함하고 있습니다.</p>
        <p>매사츄세츠 보스톤에 있는 USDA 노화에 관한 인류 영양 연구센터 (the USDA Human Nutrition Research Center on Aging) 의 자료에 의하면
            블루베리는 과일 중에서 가장 항산화 작용이 뛰어난 과일이라고 합니다.</p>
        <h2>블루베리와 노화</h2>
        <p>USDA 인류 영양 연구센터(the USDA Human Nutrition Research Center on Aging) 실험실에서 신경과학자들은 쥐들에게 블루베리를 먹임으로써
            노화에 의한 인지능력의 손실을 예방해 준다는 사실을 발견하였습니다.</p>
    </body>
</html>

 

5

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>셀렉터 만들기</title>
        <style>
            h3, li {
                color:brown;
            }
            div > div > strong {
                background-color: yellow;
            }
            ul strong {
                color:dodgerblue;
            }
            .warning {
                color: red;
            }
            body.main{
                background:aliceblue;
            }
            #list {
                background:mistyrose;
            }
            #list span {
                color:forestgreen;
            }
            h3:first-letter {
                color:red;
            }
            li:hover {
                background:yellowgreen;
            }
        </style>
    </head>
    <body class="main">
        <h3>Web Programming</h3>
        <hr>
        <div>
            <div>2학기<strong>학습 내용</strong>입니다.</div>
            <ul id="list">
                <li><span>HTML5</span></li>
                <li><strong>CSS</strong></li>
                <li>JAVASCRIPT</li>
            </ul>
            <div class="warning">60점 이하는 F!!</div>
        </div>
    </body>
</html>

 

6

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>텍스트 꾸미기</title>
        <style>
            h3 {
                text-align:right;
            }
            span {
                text-decoration:line-through;
            }
            strong {
                text-decoration: overline;
            }
            .p1 {
                text-indent: 3em;
                text-align: justify;
            }
            .p2 {
                text-indent: 1em;
                text-align: center;
            }
        </style>
    </head>
    <body>
        <h3>텍스트 꾸미기</h3>
        <hr>
        <p class="p1">HTML의 태그만으로 기존의 워드 프로세서와 같이 들여쓰기, 정렬, 공백,
            간격 등과 세밀한<span>텍스트 제어</span>를 할 수 없다.
        </p>
        <p class="p2">그러나, <strong>스타일 시트</strong>는 이를 가능하게 한다.
            들여쓰기, 정렬에 대해서 알아본다.
        </p>
        <a href="http://www.naver.com" style="text-decoration:none;">
            밑줄이 없는 네이버링크</a>
    </body>
</html>

 

7

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>박스모델</title>
        <style>
            body {
                background:ghostwhite;
            }
            span {
                background:deepskyblue;
            }
            div.box {
                background:yellow;
                border-style:solid;
                border-color:peru;
                margin:40px;
                border-width:30px;
                padding:20px;
            }
        </style>
    </head>
    <body>
        <div class="box">
            <span>DIVDIVDIV</span>
        </div>
    </body>
</html>

 

8

<!DOCTYPE html>
<html lang="ko">
    <head>
        <meta charset="utf-8">
        <title>박스모델</title>
        <style>
            div {
                background:yellow;
                padding:20px;
                border:5px dotted red;
                margin:30px;
            }
        </style>
    </head>
    <body>
        <h3>박스 모델</h3>
        <p>margin 30px, padding 20px, border 5px의 빨간색 점선</p>
        <hr>
        <div>
            <img src="mio.png" alt="고양이 눈">
        </div>
    </body>
</html>

 

9

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>이미지 테두리 만들기</title>
        <style>
            p {
                background:yellow;
                width:200px;
                height:60px;
                padding:10px;
                border:20px solid lightgray;
            }
            #round { border-image : url("border.png") 30 round; }
            #repeat { border-image : url("border.png") 30 repeat; }
            #stretch { border-image : url("border.png") 30 stretch; }
        </style>
    </head>
    <body>
        <h3>이미지 테두리 만들기</h3>
        <hr>
        다음은 원본 이미지입니다.<br>
        <img src="border.png" alt="원본">
        <hr>
        <p>20x20 크기의 회색 테두리를 가진 p태그</p>
        <p id="round">round 스타일 이미지 테두리</p>
        <p id="repeat">repeat 스타일 이미지 테두리</p>
        <p id="stretch">stretch 스타일 이미지 테두리</p>
    </body>
</html>

 

10

<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="utf-8">
    <title>text-shadow와 box-shadow</title>
    <style>
        h2 {
            text-align: center;
            color : yellow;
            text-shadow : 2px 2px 3px blue;
        }
        img:hover {
            box-shadow : 0 0 5px blue;
        }
    </style>
</head>
<body>
    <h2>Most Visited Pages</h2>
    <hr>
    <table>
        <tr>
            <td><a href="http://www.naver.com">
                <img src="naver.png" width="120" height="100">
            </a></td>
            <td><a href="http://www.chosun.com">
                <img src="chosun.png" width="120" height="100">
            </a></td>
            <td><a href="http://www.amazon.com">
                <img src="amazon.png" width="120" height="100">
            </a></td>
        </tr>
    </table>
</body>
</html>

'----------고1---------- > 화면구현' 카테고리의 다른 글

[고1 화면구현] 11 - (2)  (0) 2023.11.21
[고1 화면구현] 11 - (1)  (0) 2023.11.09
[고1 화면구현] 10 - (3)  (0) 2023.10.19
[고1 화면구현] 10 - (2)  (1) 2023.10.10
[고1 화면구현] 10 - (1)  (0) 2023.10.05

[한글 맞춤법의 원리와 내용]

제1항

표준어를 ‘소리대로’ 적는다. + 어법에 맞도록 한다.

('하늘', '오리', '날다')

 

 

제2항

단어를 단위로 하여 띄어 쓴다. 다만 조사는 앞말에 붙여 쓴다.

('나 물 좀 줘.', '나는 너를 좋아해.')

 

 


 

 

제19항

어간에

'-이'나 '-음/-ㅁ'이 붙어 명사로 된 것과

'-이'나 '-히'가 붙어서 부사로 된 것은

어간의 원형을 밝히어 적는다.

(다듬다 ➜ 다듬이)

 

 

제19항 [붙임]

이외는 어간의 원형을 밝히어 적지 않는다.

(맞다 ➜ 마중)

 

 

제20항

명사에

'-이'가 붙어서 된 말은

명사의 원형을 밝히어 적는다.

(낱낱 ➜ 낱낱이)

 

 

제20항 [붙임]


이외는 명사의 원형을 밝히어 적지 않는다.

(잎 ➜ 이파리)

 

 


 

 

제41항

조사는 앞말에 붙여 쓴다.

(꽃, 꽃밖에, 꽃이나마)

 

 

제42항

의존 명사는 띄어 쓴다.

(아는 것이 힘이다. 나도 할 있다.)

 

 

제43항

단위 명사는 띄어 쓴다.

(차 여섯 , 옷 한 , 신 두 켤레)

 

 


 

 

 

 

[언어 공동체의 담화 관습이란 무엇인가]

갈래: 만화

성격: 설명적, 반성적, 교훈적

주제: 언어 공동체의 담화 관습의 의의와 수용 태도
    ① 만화의 형식 학습 ➜ 내용을 쉽고 재미있게 전달
    ② 옛사람들의 말을 인용 ➜ 과거의 담화 관습의 특징 제시

 

 

언어문화를 공유하는 집단에서 형성된 듣기·말하기의 방식이나 습관·태도 등을 언어 공동체의 담화 관습이라 한다.

오늘날 의사소통 문화를 바람직한 방향으로 발전시키려면 언어 공동체의 담화 관습을 비판적으로 수용해야 한다.

 

 

 

 


 

 

 

 

[가시리]

갈래: 고려가요
    3·3·2조 / 3음보
    분연체 (분단되어 있는 연)
    렴구, 여음구 (뜻이 없음, 운율과 흥추만 줌)

성격: 서정적, 민요적, 애상적

주제: 이별의 정한

특징
    ① 3·3·2조 / 3음보
    ② 분연체 - 각 연이 2행
    ③ 기-승-전-결의 구조
    ④ 반복 순우리말 시어, 간결, 애잔 가사

 

 

 

 

[진달래꽃]

갈래: 현대시, 자유시

성격: 전통적, 민요적, 애상적

주제: 이별의 정한

특징
    ① 이별의 상황 (가정)
    ② 전통적 정서 ➜ 3음보
    ③ 수미상관의 구조 (운율, 안정감, 주제 강조)
    ④ '~우리다' 종결 (운율, 음악적 효과)

 

 


 

 

[상춘곡]

갈래: 서정가사, 양반가사

성격: 서정적, 묘사적, 자연친화적

주제: 봄 경치를 감상하며 느낀 즐거움과 안빈낙도(가난해도 즐김)

특징
    ① 다양한 표현기법 + 설의법 (뻔한 질문)
    ② 공간에 따른 시상전개
    ③ 4음보의 율격, 마지막 행은 시조의 종장과 유사 ➜ "3글자" (아모타)

 

 

[울타리 밖]

갈래: 자유시, 서정시

성격: 서정적, 향토적, 자연친화적

주제: 천연한 자연과 인간이 조화된 아름다운 세계에 대한 소망
         자연과 인간이 어우러진 고향에 대한 그리움

특징
    ① 시각적 이미지 활용, 풍경 묘사 ➜ 회화성
    ② 동결한 연결 어미 '~듯' 반복 ➜ 동질적 속성
    ③ 하나의 시어 '천연히'로 독립적인 연 구성 ➜ 주제의식을 함축

 

 

[춘향전]

<html lang="ko">
    <head>
        <meta charset="utf-8">
        <title>relative 배치</title>
        <style>
            div {
                display : inline-block;
                height:50px;
                width:50px;
                border:1px solid lightgray;
                color:white;
                background:red;
            }
            #down:hover {
                position:relative;
                left:20px;
                top:20px;
                background:green;
            }
            #up:hover {
                position:relative;
                right:20px;
                bottom:20px;
                background:green;
            }
        </style>
    </head>
    <body>
        <h3>상대 배치, relative</h3>
        h와 k글자에 마우스를 올려 보세요.
        <hr>
        <div>T</div>
        <div id="down">h</div>
        <div>a</div>
        <div>n</div>
        <div id="up">k</div>
        <div>s</div>
    </body>
</html>​
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <style>
            span {
                display:block;
                width:100px;
                height:60px;
                background:rgb(184, 184, 222)
            }
        </style>
    </head>
    <body>
        <h3>span 태그를 display:block으로</h3>
        <hr>
        <div>
            <span>block span</span>과
            <span>block span</span>입니다.
        </div>
    </body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <style>
            div div {
                display : inline;
                background : yellowgreen;
            }
        </style>
    </head>
    <body>
        <h3>div를 display : inline으로</h3>
        <hr>
        <div style="background : orange">
            <div>inline DIV</div>
            <div>inline DIV</div>
            <div>inline DIV</div>
        </div>
    </body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <style>
            div div {
                border : 2px dotted orangered;
                background: powderblue;
                margin:10px;
                width:60px;
                height:80px;
            }
        </style>
    </head>
    <body>
        <h3>span을 display:block으로</h3>
        <hr>
        <div style="background:orange">
            <div>inline DIV</div>
            <div>inline DIV</div>
            <div>inline DIV</div>
        </div>
    </body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <style>
            div {
                border:2px solid yellowgreen;
                color:blue;
                background:aliceblue;
            }
            span {
                border:3px dotted red;
                background:yellow;
            }
        </style>
    </head>
    <body>
        <h3>인라인, 인라인 블록, 블록</h3>
        <hr>
        나는 <div style="display:none;">div(none)</div>입니다.<br><br>
        나는 <div style="display:inline;">div</div><br><br>
        나는 <div style="display:inline-block; height:50px;">div</div><br><br>
        나는 <div>div<span style="display:block">span(block)</span>입니다.</div>
    </body>
</html>

 

'----------고1---------- > 화면구현' 카테고리의 다른 글

[고1 화면구현] 11 - (1)  (0) 2023.11.09
[고1 화면구현] 10 - (4)  (0) 2023.10.26
[고1 화면구현] 10 - (2)  (1) 2023.10.10
[고1 화면구현] 10 - (1)  (0) 2023.10.05
[고1 화면구현] 09 - (5)  (0) 2023.09.26
<구름>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Sometimes_RandomPrefab : MonoBehaviour
{
    public GameObject newPrefab; // 만드는 프리팹 :Inspector에 지정한다
    public float intervalSec = 1; // 작성 간격(초):Inspector로에 지정한다

    void Start()
    { // 처음에 시행한다
      // 지정 초 수마다 CreatePrefab를 반복 실행하는 예약
        InvokeRepeating("CreatePrefab", intervalSec, intervalSec);
    }

    void CreatePrefab()
    {
        // 이 오브젝트의 범위 내에 랜덤으로
        Vector3 area = GetComponent<SpriteRenderer>().bounds.size;

        Vector3 newPos = this.transform.position;
        newPos.x += Random.Range(-area.x / 2, area.x / 2);
        newPos.y += Random.Range(-area.y / 2, area.y / 2);
        newPos.z = -5; // 앞 쪽에 표시
                       // 프리팹을 만든다
        GameObject newGameObject = Instantiate(newPrefab) as GameObject;
        newGameObject.transform.position = newPos;
    }
}

---------------------------------------------------------------------

<폭탄>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Forever_MoveV : MonoBehaviour
{
    public float speed = -5;

    void FixedUpdate()
    {
        this.transform.Translate(0, speed / 50, 0); // 수직 이동한다
    }
}

---------------------------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Destroy_Prefab : MonoBehaviour
{
    // 충돌하면 게임을 정지한다

    public string targetObjectName; // 목표 오브젝트 이름 : Inspector에 지정
    public string showObjectName;   // 표시 오브젝트 이름 : Inspector에 지정

    GameObject showObject;

    public float limitSec = 3; // 초 수 : Inspector에 지정

    void Start()
    {   // 처음에 시행한다
        // 지우기 전에 표시 오브젝트를 기억해 둔다 
        showObject = GameObject.Find(showObjectName);

        Time.timeScale = 1;  // 시간을 움직인다

        Destroy(this.gameObject, limitSec); // 지정 초 후에 소멸하는 예약 
    }

    void OnCollisionEnter2D(Collision2D collision) // 충돌했을 때
    {
        // 만약 충돌한 것의 이름이 목표 오브젝트였다면
        if (collision.gameObject.name == targetObjectName)
        {
            showObject.SetActive(true); // 지웠던 것을 표시한다 
                                        // 시간을 멈춘다
            Time.timeScale = 0;
        }
    }
}

'----------고1---------- > 게임엔진' 카테고리의 다른 글

[고1 게임엔진] 11 - (2)  (2) 2023.11.20
[고1 게임엔진] 11 - (1)  (0) 2023.11.13
[고1 게임엔진] 10 - (2)  (2) 2023.10.16
[고1 게임엔진] 10 - (1)  (0) 2023.10.11
[고1 게임엔진] 09 - (6)  (0) 2023.09.25
class Monster:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def say(self):
        print(f"나는 {self.name} {self.age}살임")

shark = Monster("상어", 7)
wolf = Monster("늑대", 5)
dog = Monster("강아지", 4)

shark.say()
wolf.say()
dog.say()
class Unit:
    def __init__(self, name, hp):
        self.name = name
        self.hp = hp

class AttackUnit(Unit):
    def __init__(self, name, hp, damage):
        Unit.__init__(self, name, hp)
        self.damage = damage
        
    def attack(self, location):
        print("{0} : {1} 방향으로 적군을 공격합니다. [공격력 : {2}]"\
                .format(self.name, location, self.damage))
    
    def damaged(self, damage):
        print("{0} : {1} 데미지를 입었습니다.".format(self.name, damage))
        self.hp -= damage
        print("{0} : 현재 체력은 {1}입니다.".format(self.name, self.hp))
        if self.hp <= 0:
            print("{0} : 파괴되었습니다.".format(self.name))

firebat1 = AttackUnit("파이어뱃1", 50, 16)
firebat1.attack("5시")

firebat1.damaged(25)
firebat1.damaged(25)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MouseDown_CreatePrefabs : MonoBehaviour
{
    // 마우스 클릭하면 그 자리에 프리팹 생성
    // 마우스 클릭한 위치보다 조금 앞쪽에 프리팹 나타나게

    public GameObject newPrefab;    // 프리팹(게임오브젝트) 저장 - ghost

    Vector3 pos;
    void Start()
    {
        
    }

    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            // 마우스 클릭한 위치를 카메라세상안에서의 위치로 변환해서
            pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            pos.z = -5;

            // 그 위치에 새로운 프리팹 등장시킨다.
            GameObject newGhost = Instantiate(newPrefab);
            newGhost.transform.position = pos;
        }
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SomeTimes_RandomPrefabs : MonoBehaviour
{
    public GameObject newPrefab;   // 프리팹 저장(햄버거)

    float intervalSec = 1;  // 나타나는 간격(1초)


    void Start()
    {
        InvokeRepeating("CreatePrefab", intervalSec, intervalSec);
    }

    void CreatePrefab()
    {
        // 구름의 범위(area)내에서 랜덤으로 나타나게

        Vector3 area = GetComponent<SpriteRenderer>().bounds.size; // 구름의 이미지 범위
        Vector3 pos = this.transform.position;  // 구름의 위치값


        // 랜덤으로 나타나게
        pos.x += Random.Range(-area.x/2, area.x/2);
        pos.y += Random.Range(-area.y/2, area.y/2);

        // pos.z = -5;

        GameObject newHam = Instantiate(newPrefab);
        newHam.transform.position = pos;
    }
}

'----------고1---------- > 게임엔진' 카테고리의 다른 글

[고1 게임엔진] 11 - (1)  (0) 2023.11.13
[고1 게임엔진] 10 - (3)  (0) 2023.10.18
[고1 게임엔진] 10 - (1)  (0) 2023.10.11
[고1 게임엔진] 09 - (6)  (0) 2023.09.25
[고1 게임엔진] 09 - (5)  (2) 2023.09.20
print("Python", "Java")
print("Python" + "Java")
print("Python", "Java", sep=".")
print("Python", "Java", "JavaScript", sep=" vs ")
print("Python", "Java", sep=", ", end="?")
print("무엇이 더 재미있을까요?")
for num in range(1, 21):
    print("대기번호 :" + (str(num).zfill(3)))
print("{0: >+10}".format(500))
print("{0: >+10}".format(-500))

피보나치

def fib(n):
    if n==0:
        return 0
    if n==1:
        return 1
    return fib(n-2) + fib(n-1)

for i in range(10):
    print(fib(i))

문서

score_file = open("score.txt", "w", encoding="utf-8")
print("수학 : 0", file = score_file)
print("영어 : 50", file = score_file)
score_file.close()

score_file = open("score.txt", "a", encoding="utf-8")
score_file.write("과학 : 80")
score_file.write("\n코딩 : 100")
score_file.close()
considerate   사려 깊은, 배려하는 supplies   보급품, 물자
remind ... of   ...에게 ~을 생각나게 하다 passion   열정
in progress   진행 중인 humanity   인류, 인간성, 인간애
cast   깁스, 붕대 qualification   자격, 자질, 능력
concern   걱정, 염려, 관심, 관심사 yield   양보하다
grateful   고마워하는, 감사하는 inconvenience   불편
arrange   정리하다, 배열하다 volunteer   자원 봉사자,
자원 봉사를 하다
relief   구호, 구호물자, 안심, 완화 immigrant  이민자, 이주자
initiative   (특정한 목적 달성) 계획 give ... a try   ...을 한 번 해보다, 시도하다
first aid   응급 처치 bow   인사하다, 절하다

 

palm   손바닥 one by one   하나씩
entusiastic   열렬한, 열광적인 gather   모이다, 모으다
get in touch with   ...와 연락하다 feel like -ing   ...인 것처럼 느끼다
look back   되돌아보다 recording   녹음, 녹화
come to   ...하게 되다 accurate   정확한
run   경영하다, 운영하다 pronunciation   발음
participate in   ...에 참가하다 beat   (심장이) 뛰다, 울리다
mind   상관하다, 신경 쓰다 available   이용 가능한, 시간이 있는
complete   완성하다, 끝마치다 empty   비어 있는, 비우다
collaboration   공동 작업, 협력 confuse   혼란시키다

5. Volunteering: A Joyful Experience (자원봉사: 즐거운 경험)

Many people around us are in need of help.
우리 주위의 많은 사람들은 도움이 필요합니다.

 

 

Namaste, Kumari! (나마스테 쿠마리!)

 

I had always felt nervous about meeting people from other countries.
나는 항상 다른 나라 사람들을 만나는 것이 불안했다.

 

 

On the day when I first started volunteering, the students gave me a warm welcome.
내가 처음 자원 봉사를 시작한 날, 학생들은 나를 따뜻하게 맞이했다.

 

 

I experienced the joy of teaching.
나는 가르침의 즐거움을 느꼈다.

 

 

 

 

Painting the World Bright (세계를 밝게 그리기)

When I became a high school student, I joined an art club.
내가 고등학생이 되었을 때, 나는 예술 클럽에 가입했다.

 

 

I painted some butterflies, honey bees, and flowers.
나는 나비와, 꿀벌과 꽃을 그렸다.

 

 

Our collaboration had turned the empty wall into a beautiful, exciting garden.
우리의 협력으로 그 빈 벽은 아름답고 흥미로운 정원으로 변했다.

 

 

 

 

Sending Joy Through My Voice (내 목소리로 즐거움을 전달하기)

 

One day, when I was watching TV, I learned about "voice volunteering."
It meant making audio books for the blind by reading the books around.
어느 날, TV를 보고 있을 때, 나는 "음성 자원 봉사"에 대해 배웠다.
그것은 책을 읽어 시각 장애인들을 위한 오디오 책을 읽는 것을 의미했다.

 

 

My first job was to read a history book for high school students.
나의 첫 번째 직업은 고등학생들을 위한 역사책을 읽는 것이였다.

 

 

I am enjoying reading the books more and more.
나는 책 읽는 것을 점점 더 즐기고 있다.

 

 

 

 


come to mind   생각이 떠오르다 refreshing   신선한
look good on   ...에게 잘 어울리다 stew   스튜
commanding officer   사령관 grain   곡류, 곡식
depart   출발하다 barley   보리
sunscreen   자외선 차단제 mailbox   우편함
handicraft   수공예, 수공예품 costume   (특정 지역, 시기) 복장
head to   ...로 향하다 catch one's eye   ...의 눈길을 사로잡다
sled   썰매 leave ... behind   ...을 뒤로 미루다
get off   ...(비행기 등)에서 내리다 harbor   항구
clap   박수, 박수치다 melt   (열로 인해) 녹다

 

destination   목적지 lighthouse   등대
insist   주장하다 spicy   맛이 강한(자극적인)
gradually   점차 magnificent   훌륭한, 웅장한
see off   배웅하다 exhibition   전시, 전시회
take off   이륙하다 ankle   발목
remain   남아있다, 간직하다 swell   (몸이) 붓다
seafood   해산물 mean to   ...할 셈이다
ferry   연락선 give regards to   ...에게 안부를 전하다
rent   빌리다, 임차료 telescope   망원경
hike   도보여행하다, 등산하다 on one's way   ...로 가는 길에

6. JOURNEY TO A COLORFUL LAND (다채로운 땅의 여정)

One day, Dad showed me a wonderful picture of the Nothern Lights.
어느 날, 아빠는 나에게 멋진 북극광 사진을 보여주었다.

 

 

Day 1 (첫째 날)

 

When I got out, I noticed other passengers clapping their hands as they got off.
내가 밖으로 나왔을 때, 다른 승객들이 내리면서 박수를 치는 것을 알아챘다.

 

 

Mom and I followed what they did without knowing why.
엄마와 나는 이유도 모른 채 그들을 따라했다.

 

 

Nuuk, the capital city of Greenland, looked quite modern and clean.
그린란드의 수도, 누크는 매우 현대적이고 깨끗해 보였다.

 

 

As we entered his house, Ms. Nielsen and their son Joas said, "Tikilluarit."
It means "welcome" in Greenlandic.
우리가 그의 집에 들어가자, Nielsen 부인과 그들의 아들 Joas가 "티킬루아릿"이라고 말했다.
그것은 그린란드어로 "환영합니다"라는 뜻이다.

 

 

They cooked suaasat, a traditional Greenlandic stew.
그들은 그린란드 전통 슈트인, 수아사트를 요리했다.

 

 

Ms. Nielsen told us it was made from whale meat with chopped onions, carrots, mushrooms,
and several grains such as barley.
Nielsen 부인은 우리에게 그것이 다진 양파, 당근, 버섯,
그리고 보리와 같은 몇 가지 곡물과 고래 고기로 만들어졌다고 말해 주었다.

 

 

 

 

Day 2 (둘째 날)

 

At the museum, we could see trditional costumes, tools, and handicrafts made by the Inuit,
who are the native Greeanlanders.
박물관에서, 우리는 이누이트족이 만든 전통 의상들, 도구들, 그리고 수공예품들을 볼 수 있었는데,
그들은 그린란드 원주민이다.

 

 

Using animal bones and horns, they made weapons and tools such as knives and needles,
and even carved works of art.
동물 뼈와 뿔을 사용해서, 그들은 칼과 바늘들과 같은 무기들이나 도구들,
심지어 예술 작품들까지 깎아서 만들었다.

 

 

 

 

Day 3 (셋째 날)

 

He explained that the word "ilulissat" means "icebergs" in Greenlandic.
그는 '일루리사트'라는 말이 그린란드어로 '빙산들'을 뜻한다고 설명했다.

 

 

I wanted to see a dog sled, but it was not snowy enough for them yet.
나는 개 썰매를 보고 싶었지만, 그것들이 지나다니기에는 아직 눈이 충분히 덮여 있지 않았다.

 

 

Mr. Nielsen said, "The icebergs are melting and slowly changing into new shapes every day.
In fact, they are melting faster than ever."
Nilesen씨는 "빙산들은 녹고 있으며 매일 새로운 모양으로 천천히 변하고 있어요.
사실, 어느 때보다도 더 빨리 녹고 있어요."라고 말했다.

 

 

 

 

Day 4 (넷째 날)

 

Leaving Ilulissat behind, we went to Kangerlussuaq, the final destination of our journey.
일루리사트를 뒤로한 채, 우리는 우리 여행의 마지막 목적지인 캉에를루수아크로 갔다.

 

 

Mr. Nielsen insisted that we get settled early, saying the Nothern Lights might appear any time after dark.
Nilesen씨는 날이 어두워진 후에는 북극광이 언제든 나타날 수 있다며, 우리가 일찍 자리를 잡아야 한다고 주장했다.

 

 

At first, they looked like candle flames waving in the wind.
처음에는, 그것들이 바람에 흔들리는 촛불처럼 보였다.

 

 

Then, they gradually turned into curtains of green lights that kept changing color and shape.
그러더니, 그것들은 점차 색깔과 모양이 계속 변하는 녹색 불빛의 커튼들로 변했다.

 

 

It looked as if the lights were slowly dancing to the music of nature.
그것은 마치 저 불빛들이 자연의 음악에 맞추어 천천히 춤을 추고 있는 것처럼 보였다.

 

 

 

 

Day 5 (다섯째 날)

 

I was also able to learn about the strong spirit of the native people living here.
나는 또한 이곳에서 살고 있는 원주민들의 강인한 정신에 대해서도 배울 수 있었다.

 

 

It will always remain in my memory as a dynamic and colorful place to visit.
그곳은 내 기억 속에 항상 역동적이면서도 다채로운 방문지로 남아 있을 것이다.