- š Hi, Iām @Mohanvaishu
- š Iām interested in ...
- š± Iām currently learning ...
- šļø Iām looking to collaborate on ...
- š« How to reach me ... #!/usr/bin/python
from os import system, name import itertools import threading import time import sys import datetime from base64 import b64decode,b64encode from datetime import date
expirydate = datetime.date(2022, 11, 20) #expirydate = datetime.date(2021, 8, 30) today=date.today() def hero():
def chalo():
done = False
#here is the animation
def animate():
for c in itertools.cycle(['|', '/', '-', '\\']) :
if done:
break
sys.stdout.write('\rconnecting to server for next colour--------- ' + c)
sys.stdout.flush()
time.sleep(0.1)
sys.stdout.write('\rDone! ')
t = threading.Thread(target=animate)
t.start()
#long process here
time.sleep(5)
done = True
def chalo1():
done = False
#here is the animation
def animate():
for c in itertools.cycle(['|', '/', '-', '\\']):
if done:
break
sys.stdout.write('\rgetting the colour wait --------- ' + c)
sys.stdout.flush()
time.sleep(0.1)
sys.stdout.write('\rDone! ')
t = threading.Thread(target=animate)
t.start()
#long process here
time.sleep(5)
done = True
def clear():
# for windows
if name == 'nt':
_ = system('cls')
# for mac and linux(here, os.name is 'posix')
else:
_ = system('clear')
clear()
y=1
newperiod=period
banner='figlet RXCE 5.o'
thisway=[2,6,8,11,12,15,16,18,19,20]
thatway=[1,3,4,5,7,9,10,14,13,17]
numbers=[]
i=1
while(y):
clear()
system(banner)
print("Contact me on telegram @tusharma3")
print("Enter" ,newperiod,"Price :")
current=input()
current=int(current)
chalo()
print("\n---------Successfully Connected to the server-----------")
chalo1()
print("\n---------Successfully got the colour -------------")
print('\n')
def getSum(n):
sum=0
for digit in str(n):
sum += int(digit)
return sum
if i in thisway:
m=getSum(current)
n=int(current)%10
if((m%2==0 and n%2==0) or (m%2==1 and n%2==1)):
if current in numbers:
print(newperiod+1," : boomred_circleREDred_circleboom")
else:
print(newperiod+1," : boomgreen_circleGREENgreen_circleboom")
else:
if current in numbers:
print(newperiod+1," : boomgreen_circleGREENgreen_circleboom")
else:
print(newperiod+1," : boomred_circleREDred_circleboom")
if i in thatway:
m=getSum(current)+1
n=int(current)%10
if((m%2==0 and n%2==0) or (m%2==1 and n%2==1)):
if current in numbers:
print(newperiod+1,": boomboomred_circleREDred_circleboomboom")
else:
print(newperiod+1,": boomboomgreen_circleGREENgreen_circleboomboom")
else:
if current in numbers:
print(newperiod+1,": boomboomred_circleREDred_circleboomboom")
else:
print(newperiod+1,": boomboomgreen_circleGREENgreen_circleboomboom")
i=i+1
newperiod+=1
numbers.append(current)
y=input("Do you want to play : Press 1 and 0 to exit \n")
if(y==0):
y=False
if (len(numbers)>19):
clear()