Commit a7fb6558 authored by sumet's avatar sumet

ส่งงาน week03

parent 2c358181
...@@ -6,3 +6,4 @@ def values(v,p=4,n=3): ...@@ -6,3 +6,4 @@ def values(v,p=4,n=3):
sign = -1 if V[0]==1 else 1 sign = -1 if V[0]==1 else 1
return sign*sum([V[i]*(2**(p-i)) for i in range(1,p+n+1)]) return sign*sum([V[i]*(2**(p-i)) for i in range(1,p+n+1)])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment