Giter VIP home page Giter VIP logo
  • šŸ‘‹ 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

-- coding: UTF-8 --

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()

mohanvaishu's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.