Skip to content
Snippets Groups Projects
Commit 4e799c4d authored by KimMinSeob's avatar KimMinSeob
Browse files

Upload New File

parent 6178332b
No related branches found
No related tags found
No related merge requests found
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> a=0
>>> b=1
>>> c=2
>>> d
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
d
NameError: name 'd' is not defined
>>> d=3
>>> a
0
>>> b
1
>>> c
>>> d
3
>>> c
2
>>> e=4
>>> f=5
>>> g=6
>>> h=7
>>> i=8
>>> j=9
>>> k=10
>>> l=11
>>> m=12
>>> n=13
>>> o=14
>>> p=15
>>> a
0
>>> b
1
>>> c
2
>>> d
3
e
>>>
>>> f
5
>>> e
4
>>> f
5
>>> g
6
>>> h
7
>>> i
8
>>> j
9
>>> k
10
>>> l
11
>>> m
12
>>> n
13
>>> o
14
>>> p
15
>>> bin(a)
'0b0'
>>> bin(b)
'0b1'
>>> bin(c)
'0b10'
>>> bin(d)
'0b11'
>>> bin(e)
'0b100'
>>> bin(f)
'0b101'
>>> bin(g)
'0b110'
>>> bin(h)
'0b111'
>>> bin(i)
SyntaxError: invalid syntax
>>> bin(i)
'0b1000'
>>> bin(j)
'0b1001'
>>> bin(k)
'0b1010'
>>> bin(l)
'0b1011'
>>> bin(m)
'0b1100'
>>> bin(n)
'0b1101'
>>> bin(o)
'0b1110'
>>> bin(p)
'0b1111'
>>> hex(a)
'0x0'
>>> hex(b)
'0x1'
>>> hex(c)
'0x2'
>>> hex(d)
'0x3'
>>> hex(e)
'0x4'
>>> hex(f)
'0x5'
>>> hex(g)
'0x6'
>>> hex(h)
'0x7'
>>> hex(i)
'0x8'
>>> hex(j)
'0x9'
>>> hex(k)
'0xa'
>>> hex(l)
'0xb'
>>> hex(m)
'0xc'
>>> hex(n)
'0xd'
>>> hex(o)
'0xe'
h
>>> e
>>> hex(p)
'0xf'
>>> hex(255)
'0xff'
>>> hex(12345)
'0x3039'
>>>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment