Á¤¼ºÈÆ
    ½Ç½À Ãß°¡ ¹®Á¦ (¸ð¹ü ´ä¾È)



¹øÈ£ ¹®Á¦ ½ÇÇà°á°ú ¼Ò½º ÄÚµå
1

print ÇÔ¼ö¸¦ ÇÑ ¹ø¸¸ »ç¿ëÇÏ¿© "Python", "is", "awesome!" ¼¼ ´Ü¾î¸¦ °¢°¢ ´Ù¸¥ ÁÙ¿¡ Ãâ·ÂÇϼ¼¿ä.

print("Python\nis\nawesome!")
 
2

º¯¼ö name¿¡ ´ç½ÅÀÇ À̸§À» ÀúÀåÇÑ ÈÄ, "My name is [name]." Çü½ÄÀ¸·Î Ãâ·ÂÇϼ¼¿ä. ¿©±â¼­ [name]Àº º¯¼ö¿¡ ÀúÀåµÈ °ªÀ¸·Î ´ëüµÇ¾î¾ß ÇÕ´Ï´Ù.

name = "È«±æµ¿"
print(f"My name is {name}.")

print("My name is", name)

print("My name is %s"%(name))

print("My name is {}".format(name))

3

print ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© 7°ú 8À» °öÇÑ °á°ú¸¦ Ãâ·ÂÇϼ¼¿ä.

print(7 * 8)
4

print ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© "7 + 8 ="°ú 7 + 8ÀÇ °è»ê °á°ú¸¦ °°Àº ÁÙ¿¡ Ãâ·ÂÇϼ¼¿ä.

print("7 + 8 =", 7 + 8)
5

print ÇÔ¼ö¿Í ÁÙ¹Ù²Þ ¹®ÀÚ(\n)¸¦ »ç¿ëÇÏ¿© "First Line"°ú "Second Line"À» °¢°¢ ´Ù¸¥ ÁÙ¿¡ Ãâ·ÂÇϼ¼¿ä.

print("First Line\nSecond Line")
6

"Name", "Age", "Country"¸¦ °¢°¢ ÅÇ °£°ÝÀ¸·Î ºÐ¸®ÇÏ¿© ÇÑ ÁÙ¿¡ Ãâ·ÂÇϼ¼¿ä.

print("Name\tAge\tCountry")
7

print ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ´ÙÀ½ ¹®ÀåÀ» Ãâ·ÂÇϼ¼¿ä: She said, "Python is my favorite language!"

print('She said, "Python is my favorite language!"')
8

print ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© PythonÀÇ ¿©·¯ ÁÙ ¹®ÀÚ¿­(""" ¶Ç´Â ''' »ç¿ë)À» È°¿ëÇØ ´ÙÀ½ÀÇ 3ÁÙÂ¥¸® ½Ã¸¦ Ãâ·ÂÇϼ¼¿ä.
Roses are red,
Violets are blue,
I love Python

print("""Roses are red,
Violets are blue,
I love Python""")
9

º¯¼ö fruit¿¡ "apple", number¿¡ 10À» ÀúÀåÇÑ ÈÄ, "I have 10 apples." Çü½ÄÀ¸·Î Ãâ·ÂÇϼ¼¿ä. ¿©±â¼­ ¼ýÀÚ¿Í °úÀÏÀÇ À̸§Àº º¯¼ö¸¦ »ç¿ëÇÏ¿© Ãâ·ÂÇØ¾ß ÇÕ´Ï´Ù.

 fruit = "apple"
 number = 10
 print(f"I have {number} {fruit}s.")
10

turtle ±×·¡ÇÈ ¶óÀ̺귯¸®¸¦ import ÇÏ°í ÅÍƲ °´Ã¼¸¦ »ý¼ºÇÕ´Ï´Ù.

import turtle
t = turtle.Turtle() 
    
turtle.done()
try:
    turtle.bye()
except:
    print("bye")   

 

 

  µî·ÏÀÏ : 2024-03-13 [15:59] Á¶È¸ : 227 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûsimple_test.ipynb
¡ä ´ÙÀ½±Û½Ç½À Ãß°¡ ¹®Á¦ (¸ð¹ü ´ä¾È)
Python for AI ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
Anaconda3 ¼³Ä¡
ColabTurtlePlus
½Ç½À ¸ñ·Ï
Colab ½Ç½À
½Ç½À ½Ã ÇлýµéÀÌ ÀÚÁÖÇÏ´Â ½Ç¼ö ¿¹µé
1       ¦¦❸ ¨Õ½Ç½À Ãß°¡ ¹®Á¦ (¸ð¹ü ´ä¾È) 227 03-13

[1] [Prev]-[11][12][13][14][15][16][17][18][19][20]