From 4e799c4d5d5a44b3fba43c0e0570f005c8c3611e Mon Sep 17 00:00:00 2001
From: KimMinSeob <msmk530@ajou.ac.kr>
Date: Mon, 26 Nov 2018 20:56:22 +0900
Subject: [PATCH] Upload New File

---
 lecture node4-bin,hex.py | 142 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 142 insertions(+)
 create mode 100644 lecture node4-bin,hex.py

diff --git a/lecture node4-bin,hex.py b/lecture node4-bin,hex.py
new file mode 100644
index 0000000..07aa7a1
--- /dev/null
+++ b/lecture node4-bin,hex.py	
@@ -0,0 +1,142 @@
+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'
+>>> 
-- 
GitLab