데이터 재료과학 (제 2강)

데이터 분석/해석 및 시각화(그래프) 등 기초 컴퓨터 활용 능력

1. 목표

2. Python 환경 확인

## 2.1. 파이썬

```batch
Microsoft Windows [Version 10.0.26200.8655]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Youngung> python
Python 3.13.14 (tags/v3.13.14:fd17997, Jun 10 2026, 13:03:48) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
```

## 2.2. VS code에서 JuPyter 셋업 & 구동되어 있는가?

## 2.3 CLI (command line interface 기초)

Source / version control via Git

3. 모듈 만들기 및 실습

에러 메시지 1.

  Traceback (most recent call last):
    File "/Users/youngung/repo/lectures/1_2_data_mse/ex/01_Hello/hello.py", line 1, in <module>
      xprint('Hello, world')
      ^^^^^^
  NameError: name 'xprint' is not defined. Did you mean: 'print'?

에러 메시지 2.

/Users/youngung/.pyenv/versions/3.12.2/bin/python: can't open file '/Users/youngung/repo/youngung.github.io/mdim.py': [Errno 2] No such file or directory

4. 간단한 조작 실습

5. 변수와 연산자

6. 예시

6.1. 실습 예시 2-1

6.2. 실습 예시 2-2

\[25 \text{ cm} \times \frac{0.393 \text{ inch}}{1 \text{ cm}}=25 \text{ cm} \times \frac{0.393 \bcancel{\text{ ch}}}{1 \bcancel{\text{cm}}}\] \[=25 \text{ cm} \times 0.393= 9.825 \text{ cm}.\]

6.3. 실습 예시 2-3

## 예시
c = float(input("섭씨 온도: "))
f = c * 9/5 + 32
print(f"{c:.2f}C= {f:.2f}F")

6.4. 실습 예시 2-4