Untitled

 avatar
unknown
plain_text
2 years ago
13 kB
6
Indexable
import turtle
import time
import os
import colorama
from colorama import Fore
#ascii
os.system('cls')

print(Fore.GREEN +
"""
                               ---------------------------------------------------------
                               |██╗░░██╗██╗░░██╗░█████╗░████████╗░█████╗░███╗░░░███╗██╗|
                               |██║░██╔╝██║░░██║██╔══██╗╚══██╔══╝██╔══██╗████╗░████║██║|
                               |█████═╝░███████║███████║░░░██║░░░███████║██╔████╔██║██║|
                               |██╔═██╗░██╔══██║██╔══██║░░░██║░░░██╔══██║██║╚██╔╝██║██║|
                               |██║░╚██╗██║░░██║██║░░██║░░░██║░░░██║░░██║██║░╚═╝░██║██║|
                               |╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚═╝|
                               --------------------------------------------------------"""
                                     + Fore.YELLOW + '\n                                                 project with if-else        ')

username = input(Fore.CYAN + 'Enter Your Username: ')
password = input(Fore.CYAN + 'Enter Your Password: ')

login_text =                        """
                                        ██╗░░░░░░█████╗░░██████╗░██╗███╗░░██╗
                                        ██║░░░░░██╔══██╗██╔════╝░██║████╗░██║
                                        ██║░░░░░██║░░██║██║░░██╗░██║██╔██╗██║
                                        ██║░░░░░██║░░██║██║░░╚██╗██║██║╚████║
                                        ███████╗╚█████╔╝╚██████╔╝██║██║░╚███║
                                        ╚══════╝░╚════╝░░╚═════╝░╚═╝╚═╝░░╚══╝
                                                                             """
success_text =               """
                                ░██████╗██╗░░░██╗░█████╗░░█████╗░███████╗░██████╗░██████╗
                                ██╔════╝██║░░░██║██╔══██╗██╔══██╗██╔════╝██╔════╝██╔════╝
                                ╚█████╗░██║░░░██║██║░░╚═╝██║░░╚═╝█████╗░░╚█████╗░╚█████╗░
                                ░╚═══██╗██║░░░██║██║░░██╗██║░░██╗██╔══╝░░░╚═══██╗░╚═══██╗
                                ██████╔╝╚██████╔╝╚█████╔╝╚█████╔╝███████╗██████╔╝██████╔╝
                                ╚═════╝░░╚═════╝░░╚════╝░░╚════╝░╚══════╝╚═════╝░╚═════╝░
                                                                                        """ 
home_page =                  """
                                        ██╗░░██╗░█████╗░███╗░░░███╗███████╗
                                        ██║░░██║██╔══██╗████╗░████║██╔════╝
                                        ███████║██║░░██║██╔████╔██║█████╗░░
                                        ██╔══██║██║░░██║██║╚██╔╝██║██╔══╝░░
                                        ██║░░██║╚█████╔╝██║░╚═╝░██║███████╗
                                        ╚═╝░░╚═╝░╚════╝░╚═╝░░░░░╚═╝╚══════╝
                                                                                        """
calculator_text ="""                                                              
                ░█████╗░░█████╗░██╗░░░░░░█████╗░██╗░░░██╗██╗░░░░░░█████╗░████████╗░█████╗░██████╗░
                ██╔══██╗██╔══██╗██║░░░░░██╔══██╗██║░░░██║██║░░░░░██╔══██╗╚══██╔══╝██╔══██╗██╔══██╗
                ██║░░╚═╝███████║██║░░░░░██║░░╚═╝██║░░░██║██║░░░░░███████║░░░██║░░░██║░░██║██████╔╝
                ██║░░██╗██╔══██║██║░░░░░██║░░██╗██║░░░██║██║░░░░░██╔══██║░░░██║░░░██║░░██║██╔══██╗
                ╚█████╔╝██║░░██║███████╗╚█████╔╝╚██████╔╝███████╗██║░░██║░░░██║░░░╚█████╔╝██║░░██║
                ░╚════╝░╚═╝░░╚═╝╚══════╝░╚════╝░░╚═════╝░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░░╚════╝░╚═╝░░╚═╝
                                                                                                """
error_text = """
                                    ███████╗██████╗░██████╗░░█████╗░██████╗░
                                    ██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔══██╗
                                    █████╗░░██████╔╝██████╔╝██║░░██║██████╔╝
                                    ██╔══╝░░██╔══██╗██╔══██╗██║░░██║██╔══██╗
                                    ███████╗██║░░██║██║░░██║╚█████╔╝██║░░██║
                                    ╚══════╝╚═╝░░╚═╝╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝
                                                                                                """


if username =='admin' and password =='admin':
    os.system('cls')
    print(Fore.GREEN + login_text)
    print(Fore.YELLOW +
                                    """
                                        ▬
                                        1%                                   """)
    time.sleep(0.8)
    os.system('cls')
    print(Fore.GREEN, login_text)
    print(Fore.YELLOW, 
                                    """
                                        ▬▬▬▬▬
                                        12%                                  """)
    time.sleep(0.8)
    os.system('cls')
    print(Fore.GREEN, login_text)
    print(Fore.YELLOW, 
                                    """
                                        ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                        40%                                  """)
    time.sleep(0.8)
    os.system('cls')
    print(Fore.GREEN, login_text)
    print(Fore.YELLOW, 
                                    """
                                        ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                        70%                                  """)
    time.sleep(0.8)
    os.system('cls')
    print(Fore.GREEN, login_text)
    print(Fore.YELLOW, 
                                    """
                                        ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                        94%                                  """)
    time.sleep(0.8)
    os.system('cls')
    print(Fore.GREEN, login_text)
    print(Fore.YELLOW, 
                                    """
                                        ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                        100%                                  """)
    time.sleep(0.8)

    os.system('cls')
    
    print(Fore.GREEN + success_text)
    print(Fore.YELLOW + 
                                    """
                                               redirecting to home page.
                                                                              """)
    time.sleep(0.8)

    os.system('cls')
 
    print(Fore.GREEN + success_text)
    print(Fore.YELLOW + 
                                    """
                                               redirecting to home page..
                                                                              """)
    time.sleep(0.8)

    os.system('cls')
 
    print(Fore.GREEN + success_text)
    print(Fore.YELLOW + 
                                    """
                                               redirecting to home page...
                                                                              """)
    time.sleep(0.8)

    os.system('cls')
 
    print(Fore.GREEN + success_text)
    print(Fore.YELLOW + 
                                    """
                                               redirecting to home page.
                                                                              """)
    time.sleep(0.8)

    os.system('cls')

    print(Fore.GREEN + home_page)

    print(Fore.CYAN + '1. Calculator')
    print(Fore.CYAN + '2. Exit')

    answer = input(Fore.YELLOW + 'Chose an option: ')

    if answer =="1":
        os.system('cls')
        print(Fore.GREEN + calculator_text)

        first_number = float(input(Fore.CYAN + 'Enter first number: '))
        second_number = float(input(Fore.CYAN + 'Enter second number: '))
        operation = input(Fore.CYAN + 'Enter operation: ')

        if operation =="+":
            javab = first_number + second_number
            print(Fore.YELLOW + f'The answer is {javab}')
        elif operation =="-":
            javab_menha = first_number - second_number
            print(Fore.YELLOW + f'The answer is {javab_menha}')
        elif operation =="*":
            javab_zarb = first_number * second_number
            print(Fore.YELLOW + f'The answer is {javab_zarb}')
        elif operation =="%":
            javab_taghsim = first_number / second_number
            print(Fore.YELLOW + f'The answer is {javab_taghsim}')
        else:
            os.system('cls')
            print(Fore.RED + error_text)

    elif answer =="2":
        import sys
        sys.exit()
else:
    os.system('cls')
    print(Fore.RED, error_text)