Skip to content
Snippets Groups Projects
Commit 58046e2f authored by KimTaeeun's avatar KimTaeeun
Browse files

Upload New File

parent 43a580d7
No related branches found
No related tags found
No related merge requests found
엑셀 날짜 숫자로 바꿨을 때 1뺀게 맞음
1900년 2월은 28일까지밖에 없다.
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 2018-1900
118
>>> 118*365
43070
>>> 118 // 4
29
>>> 43070 + 29
43099
>>> 43099 + 31+ 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 +31+6
43409
>>> 118 // 100
1
>>> 400년마다 윤년.. (2000년)
16진수나 8진수나 2진수로 바꾸는법(기말)
16진수는 4개씩 묶어야됨
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 118 % 100
18
>>> 118.4 % 100.6
17.80000000000001
>>> 118.4 // 100.6
1.0
>>> 118.4 - 100.6
17.80000000000001
>>> hex(2000)
'0x7d0'
>>> hex(3)
'0x3'
>>> oct(2000)
'0o3720'
>>> bin(2000)
'0b11111010000'
>>> 118.4 / 100.6
1.1769383697813123
>>> a = 255
>>> hex(a)
'0xff'
>>> // 따옴표 꼭 써야함 (문자열)
SyntaxError: invalid syntax
>>> b=hex(a)
>>> type(b)
<class 'str'>
>>> a
255
>>> b
'0xff'
>>> hex = 400
>>> hex
400
>>> hex(400)
Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
hex(400)
TypeError: 'int' object is not callable
>>> 2**100
1267650600228229401496703205376
>>> 2//7
0
>>> 22/7
3.142857142857143
>>> import math
>>> math.pi
3.141592653589793
>>> math.sin(math.pi)
1.2246467991473532e-16
>>> =0
SyntaxError: invalid syntax
>>> round(192384,-2)
192400
>>> a = 192384
>>> (a//100) * 100
192300
>>> (a + 99) // 100 * 100
192400
>>> a + 50) // 100 * 100
SyntaxError: invalid syntax
>>> (a+50) // 100 * 100
192400
>>>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment