Code Monkey home page Code Monkey logo

Info

Hi, I'm Spiral; I'm a game developer/programmer who loves making things using code. I know how to code in c#, javascript, python, html, and css

My Discord Spiral#1234

spiralgaming

Portfolio

My Apps

My Apps
Texter

Texter Github Link

Texter .zip download

Texter .msi download

Texter .exe download

Counter

Counter Github Link

Counter .zip download

Counter .msi download

Counter .exe download

Mathiest

Mathiest Github Link

Mathiest .zip download

Mathiest .msi download

Mathiest .exe download

My Games

My Games
Sword Fighters

Sword Fighters

Sword Fighters Game

Sword Fighters Discord Bot

Sword Fighters Chrome Extenstion

Python
Python Calculator

Python Calculator

Python Calculator .exe download

Python Calculator .py download

Source Code

#operand
print("+ for Addition")#
print("- for Subtraction")#
print("* for Multiplcation")#
print("/ for Division")#

while True:
    
    #input operand
    choice = input("Enter Operand: ")#
    
    if choice in ("+", "-", "*", "/"):

        #nums
        num1 = float (input("Enter First Number: "))#
        num2 = float (input("Enter Second Number: "))#
        
        # results
        addresult = num1+num2#
        subresult = num1-num2#
        mulresult = num1*num2#
        divresult = num1/num2#
        
        if choice == "+":
            print(num1, "+", num2, "=", addresult)#
        elif choice == "-":
            print(num1, "-", num2, "=", subresult)#
        elif choice == "*":
            print(num1, "*", num2, "=", mulresult)#
        elif choice == "/":
            if num2 == 0.0:
                print("Divide by 0 error")
            else:
                print(num1, "/", num2, "=", divresult)#

        else: 
            print("Invalid Choice")#
Python Password Generator

Python Password Generator

Python Password Generator .exe download

Python Password Generator .py download

Source Code

#Random Password Generator - by Spiral
#importing modules
import random
import string
#welcome text
print("Hello User, Welcome to Password Generator!\nType help for help\nType generate to generate a password without having to exclude anything\nType exclude to exclude a certain type from password.\nAvailable Items To Be Excluded:\nlowercase\nuppercase\nnumbers\nsymbols")

while True:
    option = input("Enter Option")
    if option in ("help", "generate", "exclude"):
        if option == "help":
            print("Type help to bring this text up again\nType generate to generate a password without having to exclude anything\nType exclude to exclude a certain type from password.\nAvailable Items To Be Excluded:\nlowercase\nuppercase\nnumbers\nsymbols")
        elif option == "generate":
            #password length
            passLength = int(input("Enter Password Length: "))
            #data
            lowercase = string.ascii_lowercase
            uppercase = string.ascii_uppercase
            number = string.digits
            symbol = string.punctuation
            #combine data
            data = lowercase + uppercase + number + symbol
            #generate password
            structure = random.sample(data,passLength)
            password = "".join(structure) 
            print(password)
        elif option == "exclude":
            print("Available Items To Be Excluded:\nlowercase\nuppercase\nnumbers\nsymbols")
            choice = input("Enter What You Want To Be Excluded: ")
            if choice in ("lowercase", "uppercase", "numbers", "symbols"):
                if choice == "lowercase":
                    #password length
                    passLength = int(input("Enter Password Length: "))
                    #data
                    uppercase = string.ascii_uppercase
                    number = string.digits
                    symbol = string.punctuation
                    #combine data
                    data = uppercase + number + symbol
                    #generate password
                    structure = random.sample(data,passLength)
                    password = "".join(structure) 
                    print(password)
                elif choice == "uppercase":
                    #password length
                    passLength = int(input("Enter Password Length: "))
                    #data
                    lowercase = string.ascii_lowercase
                    number = string.digits
                    symbol = string.punctuation
                    #combine data
                    data = lowercase + number + symbol
                    #generate password
                    structure = random.sample(data,passLength)
                    password = "".join(structure) 
                    print(password)
                elif choice == "numbers":
                    #password length
                    passLength = int(input("Enter Password Length: "))
                    #data
                    lowercase = string.ascii_lowercase
                    uppercase = string.ascii_uppercase
                    symbol = string.punctuation
                    #combine data
                    data = lowercase + uppercase + symbol
                    #generate password
                    structure = random.sample(data,passLength)
                    password = "".join(structure) 
                    print(password)
                elif choice == "symbols":
                    #password length
                    passLength = int(input("Enter Password Length: "))
                    #data
                    lowercase = string.ascii_lowercase
                    uppercase = string.ascii_uppercase
                    number = string.digits
                    #combine data
                    data = lowercase + uppercase + number
                    #generate password
                    structure = random.sample(data,passLength)
                    password = "".join(structure) 
                    print(password)
            else:
                print("Invalid Choice")
    else: 
        print("Invalid Option...")  
Python Number Generator

Python Number Generator

Python Number Generator .exe download

Python Number Generator .py download

#random number generator - by Spiral
import random
#prints ui
print("Type help for help")
print("Type random to get options of presets for random numbers, or chose two numbers")
print("Type custom to chose two specific numbers and get a random number from the two numbers")
#ongoing
while True:
    choice = input("Enter Option: ")
    if choice in ("help", "random", "custom"):
        if choice == "help":
            print("Type help to bring this text up again.\nType random to give options for random number presets.\nType custom to chose two specific numbers and get a random number from the two numbers\n")
            print(" ")
            print("If you type random you have a list of random number presets avaliable to use.\nAll presets chose a random number between 1 and the number of the preset.\nYou may use the following presets:\n2,\n10,\n100,\n250,\n1000,\n10000,\nand finally custom in which you choose your own digits")
        elif choice == "random":
            print("2,\n10,\n100,\n250,\n1000,\n10000,\nor custom for your own digits")    
            randomchoice = input("Enter Choice: ")
            if randomchoice in ("custom","2","10","100","250","500","1000","10000"):               
                if randomchoice == "custom":
                    num1 = int (input("Chose first number: "))
                    num2 = int (input("Chose second number: "))
                    randomNumberResult = random.randint(num1,num2)
                    print("Your random number is: ", randomNumberResult)
                    if num1 > num2:
                        print("Error: second number is larger than first number")               
                elif randomchoice == "2":
                    result = random.randint(1,2)
                    print("Your random number is: ", result)
                elif randomchoice == "10":
                    result = random.randint(1,10)
                    print("Your random number is: ", result)
                elif randomchoice == "100":
                    result = random.randint(1,100)
                    print("Your random number is: ", result)
                elif randomchoice == "250":
                    result = random.randint(1,250)
                    print("Your random number is: ", result)
                elif randomchoice == "500":
                    result = random.randint(1,500)
                    print("Your random number is: ", result)
                elif randomchoice == "1000":
                    result = random.randint(1,1000)
                    print("Your random number is: ", result)
                elif randomchoice == "10000":
                    result = random.randint(1,10000)
                    print("Your random number is: ", result)                                    
        elif choice == "custom":
                num1 = int (input("Chose first number: "))
                num2 = int (input("Chose second number: "))
                randomNumberResult = random.randint(num1, num2)
                print("Your random number is: ", randomNumberResult)
                if num1 > num2:
                    print("Error: second number is larger than first number")            
        else:
            print("Invalid Choice")
Python Game Generator

Python Game Generator

Python Game Generator .exe download

Python Game Generator .py download

import random as r
print("Welcome to the Game genre, name, and mode Generator\n\nType help for help\nType generate to generate a random game.\n\nDM on discord at 'Spiral#1234' if you want me to help you with ideas or suggestions for your game.")
while True:
    cmd = input("Enter Command: ")
    if cmd in ("help", "generate"):
        if cmd == "help":
            print("This is the Game genre, name, and mode Generator\n\nType help to reopen this text\nType generate to generate a random game.\n\nDM on discord at 'Spiral#1234' if you want me to help you with ideas or suggestions for your game.")
        if cmd == "generate":
            print("Details successfully generated randomly")
            #name
            namelist1 = ["Dark", "Dead", "Silent", "Until", "Final", "Super", "Mega", "System", "Raid", "Last", "Chase", "Non-stop", "Cave", "Target", "Wave", "Double", "Straight", "Bubble", "Orange"]
            namelist2 = ["Phobia", "Evil", "Death", "Auto", "Super", "Age", "Ultimate", "Theory", "Craft", "Prime", "Dash", "Together", "Revenge", "Ditch", "Raze", "Dart", "Curve", "Back", "Waiver"]
            chooseFromName1 = r.choice(namelist1)
            chooseFromName2= r.choice(namelist2)
            name = chooseFromName1 + " " +chooseFromName2
            #genre
            genreList = ["Sandbox", "Real-time strategy (RTS)", "Shooter (FPS and TPS)", "Multiplayer online battle arena (MOBA)", "Role-playing (RPG, ARPG)", "Simulation", "Puzzle", "Party Game", "Action-adventure", "Survival/Horror", "Platformer"]
            chooseFromGenre = r.choice(genreList)
            genre = chooseFromGenre
            #Error Fix
            #mode
            if genre == "Multiplayer online battle arena (MOBA)":
                mode = "Multiplayer"
            elif genre == "Party Game":
                mode = "Multiplayer/Co-op"
            else:
                modelist = ["Single Player", "Multiplayer", "Co-op"]
                chooseFromMode = r.choice(modelist)
                mode = chooseFromMode
            print("Game Generated... Details Below:\n\nGenerated Game Name: ", name, "\nGenerated Game Genre: ", genre, "\nGenerated Player Mode: ", mode)
    else: 
        print("Invalid Command...")
Python Timer

Python Timer Github

Python Timer .exe dowmload

Python Timer .py download

import time #SpiralGaming (github)
print("Welcome to Py-Timer")
while True:
    length = int(input("Enter Timer Length: "))
    def countdown(time_sec):
        while time_sec:
            mins, secs = divmod(time_sec, 60)
            timeformat = '{:02d}:{:02d}'.format(mins, secs)
            print(timeformat,end='\r')
            time.sleep(1)
            time_sec -= 1
        print("Timer Ended")
    yn = input("Continue? (y/n): ")
    if yn in ("y", "n"):
        if yn == "y":
            countdown(length)
        if yn == "n":
            print("Alright...")
    else:
        countdown(length)
Python User-Id Generator

Python User-Id Generator Github

Python User-Id Generator .exe download

Python User-Id Generator .py download

import random
import string
print("Welcome to userid generator\nType help for help\nType generate to generate a userid\nType exclude an item\nType recommended or r to get a list of 5 userids that are generated with the recommended userid settings\n")
while True:
    choice = input("Enter choice: ")
    if choice in ("help", "generate", "exclude", "recommended", "r"):
        uppercase = string.ascii_uppercase
        lowercase = string.ascii_lowercase
        number = string.digits
        symbol = string.punctuation
        if choice == "help":
            print("Type help to bring this text up again\nType generate to generate a userid without having to exclude anything\nType exclude to exclude a certain type from the userid.\nAvailable Items To Be Excluded:\nlowercase\nuppercase\nnumbers\nsymbols")
        if choice == "generate":
            length = int(input("Enter userid length: "))
            uppercase = string.ascii_uppercase
            lowercase = string.ascii_lowercase
            numbers = string.digits
            symbols = string.punctuation
            data = uppercase + lowercase + numbers + symbols
            struct = random.sample(data,length)
            userid = "U+"+"".join(struct)
            print(userid)
        if choice == "exclude":
            print("Available Items To Be Excluded:\nlowercase\nuppercase\nnumbers\nsymbols")
            choice = input("Enter What You Want To Be Excluded: ")
            if choice in ("lowercase", "uppercase", "numbers", "symbols"):
                if choice == "lowercase":
                    length = int(input("Enter userid Length: "))
                    data = uppercase + number + symbol
                    structure = random.sample(data,length)
                    userid = "U+"+"".join(structure) 
                    print(userid)
                elif choice == "uppercase":
                    length = int(input("Enter userid Length: "))
                    data = lowercase + number + symbol
                    structure = random.sample(data,length)
                    userid = "U+"+"".join(structure) 
                    print(userid)
                elif choice == "numbers":
                    length = int(input("Enter userid Length: "))
                    data = lowercase + uppercase + symbol
                    structure = random.sample(data,length)
                    userid = "U+"+"".join(structure) 
                    print(userid)
                elif choice == "symbols":
                    length = int(input("Enter userid Length: "))
                    data = lowercase + uppercase + number
                    structure = random.sample(data,length)
                    userid = "U+"+"".join(structure) 
                    print(userid)
        if choice == "recommended":
            print("Here are 5 random user ids: ")
            length = 20
            data = lowercase + uppercase + number
            structure = random.sample(data,length)
            userid1 = "U+"+"".join(structure) 
            print("------------------------\n",userid1)
            structure = random.sample(data,length)
            userid2 = "U+"+"".join(structure) 
            print("------------------------\n",userid2)
            structure = random.sample(data,length)
            userid3 = "U+"+"".join(structure) 
            print("------------------------\n",userid3)
            structure = random.sample(data,length)
            userid4 = "U+"+"".join(structure) 
            print("------------------------\n",userid4)
            structure = random.sample(data,length)
            userid5 = "U+"+"".join(structure) 
            print("------------------------\n",userid5, "\n------------------------")
            print("\n\nAll 5:\n", userid1,"\n", userid2,"\n", userid3,"\n", userid4,"\n", userid5)
        if choice == "r":
            print("Here are 5 random user ids: ")
            length = 20
            data = lowercase + uppercase + number
            structure = random.sample(data,length)
            userid1 = "U+"+"".join(structure) 
            print("------------------------\n",userid1)
            structure = random.sample(data,length)
            userid2 = "U+"+"".join(structure) 
            print("------------------------\n",userid2)
            structure = random.sample(data,length)
            userid3 = "U+"+"".join(structure) 
            print("------------------------\n",userid3)
            structure = random.sample(data,length)
            userid4 = "U+"+"".join(structure) 
            print("------------------------\n",userid4)
            structure = random.sample(data,length)
            userid5 = "U+"+"".join(structure) 
            print("------------------------\n",userid5, "\n------------------------")
            print("\n\nAll 5:\n", userid1,"\n", userid2,"\n", userid3,"\n", userid4,"\n", userid5)
    else:
        print("Invalid Choice...")
</details>

Stats

Profile Stats

spiralgaming

 spiralgaming

Spiral's Projects

counter icon counter

A simple yet somehow crappy counting app

texter icon texter

A simple, but crappy text editor

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.