Explorar o código

:beetle: Set an existing file as an example

DricomDragon %!s(int64=2) %!d(string=hai) anos
pai
achega
28e21f6ca6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      computeEntropy/main.py

+ 2 - 2
computeEntropy/main.py

@@ -17,7 +17,7 @@ def count(line):
         else:
             charCount[c] = 1
 
-with open("Data/Tunngle_Setup_v5.8.4.exe", 'rb') as f :
+with open("Data/hello.txt", 'rb') as f :
 
     print("Reading file")
     for l in f:
@@ -37,4 +37,4 @@ with open("Data/Tunngle_Setup_v5.8.4.exe", 'rb') as f :
     for key in charCount:
         f = charCount[key] / numberOfBits
         entropy -= f * log(f, 2)
-    print(entropy)
+    print(entropy)