lalalala
This commit is contained in:
commit
c743ca0b85
3 changed files with 103 additions and 0 deletions
31
m.py
Normal file
31
m.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Modulo Test
|
||||
from prbraid.math import *
|
||||
from prbraid.color import *
|
||||
|
||||
def main():
|
||||
while True:
|
||||
x = None
|
||||
try:
|
||||
uprint('This is red!', color=Color.Red, end=' ', flush=False)
|
||||
uprint('And this is green!', color=Color.Green, flush=True)
|
||||
x = int(input('[n]: '))
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
# calculate left padding to align i values
|
||||
lpadded = len(str(x))
|
||||
|
||||
# find all invertible elements (skipped for now)
|
||||
for i in range(x):
|
||||
lpad = ' ' * (lpadded - len(str(i)))
|
||||
grp = orbit(i, x)
|
||||
print(f'{lpad}{i} -> {len(grp)} | {grp}')
|
||||
print() # empty new line
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except (KeyboardInterrupt, EOFError):
|
||||
pass
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue