Chapter
03
생성형 AI와 자료형 익히기
index
3.1
Generative Learning AI and Data Types
With Python MicroPython
3.2
Variables in MicroPython
3. 3
Basic data types
3. 4
Collection data type
3. 5
2/28
Learning Objectives
3/28
3.1 Understanding Generative AI
1. Generative The concept of AI and LLM
3.1 Understanding Generative AI
Generative AI
5/28
2. Using Chat GPT
MicroPython Coding Learning for ChatGPT use possible
3.1 Understanding Generative AI
Main Usage examples:
6/28
3.2 Python and �MicroPython
1. What is Python ?
3.2 Python and MicroPython
In the Netherlands Guido van Rossum Developed programming language
easy Grammar and With flexibility artificial intelligence , data Analytics , Web Development gadfly extensively Used
Interpreter In a way It's running fast Development It is possible , but execution The speed relatively It may be slow
8/28
2. What is MicroPython ?
3.2 Python and MicroPython
Based on Python 3.x Lightweight In version , on microcontroller Executable
hardware Control For Exclusive library offer
Arduino environment based on C++ More intuitive by comparison Programming possible
9/28
3.3 MicroPython variable
1. Characteristics of MicroPython variables
3.3 MicroPython variable
Object In a way variable treatment
The user memory In management nerves Don't write Not Conveniently variable use possible
of variables The data type is automatic Decision ( dynamic Typing )
12/28
2. Variables name Build
3.3 MicroPython variable
Variables , functions , classes , modules or of the object name
Alphabet , uppercase and lowercase letters , numbers and Special characters Created by combining underscores ( _ )
By numbers When you start No
if, for, while, etc. same Reserved words cannot be used
meaning present name Usage : temperature_celsius = 25
Lowercase letters and Using underscore (_) : sensor_value = 100
Constant In capital letters Created by : LED_PIN = 2
identifier
variable name How to build well
13/28
3.4 Basics Data type
Basic Data Types - Summary
3.4 Basics Data type
1
Python's basic In data type Includes integers ( int ), real numbers (float), strings ( str ), and booleans (bool) .
Float : No decimal point Included 32-bit floating point number Saved
Integer ( int ): No decimal point no By numbers size There is a limit doesn't exist
String ( str ): single quotes (') or Wrap it in double quotes (") expressed
2
3
4
Boolean (bool): A True or False value Have logic In operations and conditional statements Used
5
16/28
1. Integer ( int )
3.4 Basics Data type
1
Integer type The decimal point no Numbers Indicates , �size limits without Available for use
In the calculation Natural numbers and negative numbers Used when handling
2
num = 100 print(type(num)) #
17/28
2. Float
3.4 Basics Data type
1
The real number is decimal point Including Numbers , floating point� In the manner (IEEE 754) Saved
The precision is Required science Operation or sensor In the data utilized
2
num = 3.14 print(type( num )) #
18/28
3. String ( str )
3.4 Basics Data type
1
The string is of letters It is a set Single quotes (') or Wrap it in double quotes (") expressed
The string is It is immutable various operation method Provided
2
text = "Hello, world!" print(type(text)) #
19/28
4. Boolean (bool)
3.4 Basics Data type
1
Boolean The data type is a True or False value. Have �logic In operations and conditional statements Used
0 is False, not 0 every The number is True evaluated
2
flag = True print(type(flag)) #
20/28
3.5 Collection Data type
Collection Data Types - Summary
3.5 Collection Data type
1
Python's Collection In data type Includes lists , tuples , dictionaries , and sets
Tuple : List and Similar but Change Immutable data structure
list : several The elements Can be saved Variable data structure
Dictionary : key-value pairs Saving Data type
2
3
4
set : duplicate no The elements Saving set Operation Supporting Data type
5
25/28
1. List
3.5 Collection Data type
1
The list is several The elements Can be saved Variable data structure
The order is is maintained , and indexing and Slicing Possible
2
my_list = [10, 20, 30] my_list.append (40) print( my_list ) # [10, 20, 30, 40]
26/28
2. Tuple
3.5 Collection Data type
1
Tuples are List and Similar but Change Immutable data type
data Change I don't need it Not case Used
2
my_tuple = (10, 20, 30) print( my_tuple [1]) # 20
27/28
3. Dictionary
3.5 Collection Data type
1
A dictionary contains key-value pairs. Saving As a data type , �Key By using The value fast You can check it out
my_dict = {"name": "Alice", "age": 25} print( my_dict ["name"]) # Alice
28/28
4. Set
3.5 Collection Data type
1
The set is duplication no The elements Saving As a data type , set Operation Support
my_set = {1, 2, 3, 3, 4} print( my_set ) # {1, 2, 3, 4}
29/28
Practice Problems (1/2)
1
In ChatGPT Available for use For Python Plug-in Investigate and its functions simply Please explain .
MicroPython Use it IoT For devices The program What you can get when writing The advantage Please organize it .
Python after 2020 most important Programming In language It has risen sharply . Here is the reason why Please explain .
2
3
In Unicode Hangul Expressing In the method about Please explain .
4
35/28
Practice Problems (2/2)
5
In MicroPython Unicode In a way string But , the Internet In browser, in UTF-8 format string It shows two ways . Compare and Pros and cons Please explain .
next Information Refer to the dictionary data type Variable Express yourself .
6
36/28
Q&A
Copyright© 2025 Hanbit Academy, Inc.
All rights reserved.