Skip to content

Commit 40bc53e

Browse files
author
Max Base
authored
isOcta()
1 parent 166db46 commit 40bc53e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

main.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,15 @@
55
# from tkinter import ttk
66
# import matplotlib.pyplot as plt
77
# import networkx as nx
8+
9+
def isOcta(number):
10+
isValid=True
11+
base=8
12+
if number == "":
13+
isValid=False
14+
for char in number:
15+
if char.isdigit() and int(char)<base:
16+
continue
17+
else:
18+
isValid=False
19+
return isValid

0 commit comments

Comments
 (0)