Hangman

https://repl.it/@ArnavGupta5/Hang-Man#main.py
words=["apple","explain","already","steward","deputy","healthy","satisfaction","ballot","reptile","resort"] from random import randint number=randint(0,len(words)-1) wordcreator=words[number] def splitt(word): return[char for char in word] wrong=[] correct=[] isit=False c=0 r=0 length=len(wordcreator) for q in range (0, length,1): correct.append("*") for e in range(0,11, 1): entry=input("Enter a letter: ") r=0 isit=False for w in range (0,length,1): #print(wordcreator[r]) if entry==wordcreator[r]: correct[r]=entry isit=True #r=r+1 #26 and 27 has problem if r==length-1: #print("The value of r is...", r) if isit==False: wrong.append(entry) #if "*"!=correct[r]: #print("You Won!!!!") #break r=r+1 c=c+1 print("Your incorrect letters are: ",wrong) print("You correct letters are: ",correct) print("You have guessed",c,"letters. You have",11-c,"guesses left") if e==10: print("You lost") print("The word was",wordcreator) #Entry():

Pi Calculator

Pi Calculator! Multiplies your inputed number by 3.14 a.k.a pi. Voila, you get the answer. I will add link soon. There is a glitch in repl but feel free to use your terminal to run the program!

pi = 3.14 print(" PI CALCULATOR ") num = float(input("Input number so I can multiply it by pi: ")) num2 = num * pi print("Answer is ", num2,"yo!")

Cube

A simple cube using turtle

import turtle t = turtle.Turtle() t.color("blue") for i in range(4): t.forward(100) t.left(90) t.penup() t.left(90) t.forward(60) t.right(90) t.forward(60) t.left(90) t.pendown() for i in range(4): t.forward(100) t.right(90) t.left(135) t.forward(85) t.backward(85) t.penup() t.backward(55) t.pendown() t.backward(85) t.left(45) t.penup() t.forward(100) t.right(45) t.pendown() t.forward(85) t.penup() t.right(135) t.forward(100) t.left(90) t.forward(100) t.right(135) t.pendown() t.forward(85) t.hideturtle()

Currency Converter

This is a currency converter that includes USD, Pound, Euro, Rupee, and Yen. It was made using pyqt5.

Word Reverse Game

This is word reverse(not really a game). You type a word backwards, and it will write it normally.

def main(): word = input("Enter a word: ") wordsize = len(word) print(wordsize) for i in range(len(word), 0,-1): print(i) spellword = "" for i in range(wordsize, 0, -1): # print(word[i]) print(i) spellword = spellword + word[i-1] print(spellword) main()

Google Chrome Symbol

Chrome symbol no color


import turtle t = turtle.Turtle() #drawing cirle1 r = 100 t.circle(r) #drawing inner circle t.left(90) t.penup() t.forward(80) t.pendown() t.right(90) r = 25 t.circle(r) t.penup() #drawing line1 t.right(120) t.pendown() t.forward(83) t.backward(83) t.seth(90) t.penup() t.forward(30) t.left(90) t.forward(25) #drawing line2 t.pendown() t.right(45) t.forward(74) t.backward(74) #drawing line 3 t.penup() t.seth(0) t.forward(50) t.pendown() t.forward(76) #adding the colors t.penup() t.backward(20) t.right(90) t.forward(10)

This is a hangman game

https://repl.it/@9arnavr/AntiqueTediousConfigfiles#main.py
import random name = input("What is your name?: ") print("Good Luck", name) words = ["computer", "pen", "dog", "plane", "paper", "glue", "damage", "fire", "blaze", "branch", "avacado", "hat", "bat", "ice", "lighting", "wires", "bear"] word=random.choice(words) #print(word) print("Guess a Letter: ") guesses='' turns = 10 while turns > 0: failed = 0 for char in word: if char in guesses: print(char) else: print("_") failed += 1 if failed == 0: print("You won the game!") print("The word is: ", word) break guess = input("Guess a Letter: ") guesses += guess if guess not in word: turns -= 1 print("Incorrect!") print("You have ", turns, "more guesses") if turns == 0: print("Oh No", name, "You lost, the secret word was ", word)

DNA Converter

This program converts a randomly generated DNA string to its corresponding polypeptide. However, while writing the program, I realized that it is more complicated than just basic conversions. The thing is, methionine (AUG) is the only amino acid that can start the strand and the strand is always ended by UUA, UAG, or UGA. So, the ribosome has to stop creating the polypeptide when it sees these. This is still something that I am working on including in the program. Anyway, hope you enjoy it!

from random import randint possiblevals= ["A","C", "T","G"] generatedlist= [] lengthsequence= int(input("Enter a number for the length of the DNA sequence ")) while lengthsequence%3 !=0: lengthsequence= int(input("Remember, nucleic acids are always present in groups of 3 called codons. Your number has to be divisible by 3. Please try again. ")) i=0 #making the DNA sequence while i<lengthsequence: randnum= randint(0,3) sequenceval= possiblevals[randnum] generatedlist.append(sequenceval) i=i+1 print (generatedlist) #making the RNA sequence possiblerna= ["U", "G", "A", "C"] rnalist= [] s=0 while s< lengthsequence: DNAval= generatedlist[s] dnaindex= possiblevals.index(DNAval) rnaconversion= possiblerna[dnaindex] rnalist.append(rnaconversion) s=s+1 print (rnalist) #making the amino acid chain finallist= [] str1="" a=0 b=1 c=2 e=0 p=3 listpossible= ["GCA", "GCC", "GCG", "GCU", "UGC", "UGU", "GAC", "GAU", "GAA", "GAG", "UUC", "UUU", "GGA", "GGC", "GGG", "GGU", "CAC","CAU", "AUA", "AUC", "AUU", "AAA", "AAG", "UUA", "UUG", "CUA", "CUC", "CUG", "CUU", "AUG", "AAC", "AAU","CCA", "CCC", "CCG", "CCU", "CAA","CAG","AGA", "AGG","CGA","CGC","CGG", "CGU", "AGC", "AGU", "UCA", "UCC", "UCG", "UCU", "ACA", "ACC", "ACG", "ACU", "GUA", "GUC", "GUG", "GUU", "UGG", "UAC", "UAU"] listamacids= ["Alanine", "Alanine", "Alanine", "Alanine", "Cysteine", "Cysteine", "Aspartic acid", "Aspartic acid", "Glutamic acid", "Glutamic acid", "Phenylalanine", "Phenylalanine", "Glycine", "Glycine","Glycine","Glycine", "Histidine", "Histidine", "Isoleucine", "Isoleucine", "Isoleucine", "Lysine", "Lysine", "Leucine", "Leucine", "Leucine", "Leucine", "Leucine", "Leucine", "Methionine", "Asparagine", "Asparagine", "Proline", "Proline", "Proline", "Proline", "Glutamine", "Glutamine", "Arganine", "Arganine", "Arganine", "Arganine", "Arganine", "Arganine", "Serine", "Serine", "Serine", "Serine", "Serine", "Serine", "Threonine", "Threonine", "Threonine", "Threonine", "Valine", "Valine", "Valine", "Valine", "Tryptophan", "Tyrosine", "Tyrosine"] while e< (lengthsequence/3): str1="" str1= str1+rnalist[a] str1= str1+rnalist[b] str1= str1+rnalist[c] index= listpossible.index(str1) var= listamacids[index] finallist.append(var) a=a+3 b=b+3 c=c+3 e=e+1 print (len(listpossible)) print (len(listamacids)) print (finallist)

Ultra Proogram

This program is just a combination on all my past programs. :D

#This first one is a number guessing game import random #while flag = True while flag: num = input("Type a number for an upper bound: ") #Starting the Game if num.isdigit(): print("Let's Play!") num = int(num) flag = False: else: print("Invalid input! Try Again!") secret = random.randint(1,num) guess = 5 count = 1 #Asking for the Numbers while guess != secret: guess = input("Type a number between 1 and ' + str (num) + ": ") if guess.isdigit(): guess = int(guess) #If you get it correct or incorrect if guess == secret: print("You got it!") else: print("Try agian!") count += 1 print('It took you', count, 'guesses!') #This next one is a rock paper scissors game import random comp_wins = 0 player_wins = 0 #Asking user to choose rock, paper, or scissors def Choose_Option(): user_choice = input("Choose Rock, Paper or Scissors: ") if user_choice in ["Rock", "rock", "r", "R"]: user_choice = "r" elif user_choice in ["Paper", "paper", "p", "P"]: user_choice = "p" elif user_choice in ["Scissors", "scissors", "s", "S"]: user_choice = "s" else: print("I don't understand, try again.") Choose_Option() return user_choice def Computer_Option(): comp_choice = random.randint(1, 3) if comp_choice == 1: comp_choice = "r" elif comp_choice == 2: comp_choice = "p" else: comp_choice = "s" return comp_choice while True: print("") user_choice = Choose_Option() comp_choice = Computer_Option() print("") #If you won, lost, or tied and a scoreboard if user_choice == "r": if comp_choice == "r": print("You chose rock. The computer chose rock. You tied.") elif comp_choice == "p": print("You chose rock. The computer chose paper. You lose.") comp_wins += 1 elif comp_choice == "s": print("You chose rock. The computer chose scissors. You win.") player_wins += 1 elif user_choice == "p": if comp_choice == "r": print("You chose paper. The computer chose rock. You win.") player_wins += 1 elif comp_choice == "p": print("You chose paper. The computer chose paper. You tied.") elif comp_choice == "s": print("You chose paper. The computer chose scissors. You lose.") comp_wins += 1 elif user_choice == "s": if comp_choice == "r": print("You chose scissors. The computer chose rock. You lose.") comp_wins += 1 elif comp_choice == "p": print("You chose scissors. The computer chose paper. You win.") player_wins += 1 elif comp_choice == "s": print("You chose scissors. The computer chose scissors. You tied.") #Tells number of points user and AI have print("") print("Player wins: " + str(player_wins)) print("Computer wins: " + str(comp_wins)) print("") #Asking if they want to play again user_choice = input("Do you want to play again? (y/n)") if user_choice in ["Y", "y", "yes", "Yes"]: pass elif user_choice in ["N", "n", "no", "No"]: break else: break #This last program is a calculator #Asking for the Numbers and Operation num1 = float(input("Enter First Number: ")) op = (input("Enter Operation: ")) num2 = float(input("Enter Second Number: ")) #Converting Operation to Calculator if op == "+": print(num1 + num2) elif op == "-": print(num1 - num2) elif op == "/": print(num1 / num2) elif op == "*": print(num1 * num2) else: print("Invalid! Try again!")

Hangman

This is my hangman game without a GUI

https://repl.it/join/emtopwks-supython3
#importing random because you need it import random print("this is hangman") #making an insanely long list of words WORDBANK = ["airplane",'hawkeye', 'robin', 'Galactus', 'thor', 'mystique', 'superman', 'deadpool', 'vision', 'sandman', "aquaman", 'pear', 'mango', 'apple', 'banana', 'apricot', 'pineapple','cantaloupe', 'grapefruit','jackfruit','papaya'] UnchosenWordBank = [] guesses = [] attempts = 15 #greet your user name = input("Enter your name ") print("Hello", name.capitalize(), "let's start playing Hangman!") print("The objective of the game is to guess the secret word chosen by the computer.") print("You can guess only one letter at a time. Don't forget to press 'enter key' after each guess.") print("Let the fun begin!") #pick out your secret word secretWord = random.choice(WORDBANK) print(secretWord) print("The number of allowed guesses for this word is:", attempts) g=0 guesses="" #loop da loop your question for g in range(attempts): Word = input("input a letter in lower case ") # just a benchmark # print(Word) # print(guesses) # the meat of it inside of the loop to find the letter if Word in guesses: print("You already guessed this letter, try something else.") continue else: if Word in secretWord: print("Nice guess!") else: print ("missed, try again") continue guesses+=Word

Super Program(Python)

This Project is a Combination of some of the Projects I have done:) It took some time adjusting the programs to fit this one:)

def MthNYr(): import calendar def CalMth(): yy = int(input("Enter year: ")) mm = int(input("Enter month: ")) print(calendar.month(yy, mm)) def CalYr(): #while(cont): yy = int(input("Enter year: ")) for i in range(1, 13): print(calendar.month(yy, i)) while True: ask = input("Would you like for I to print month or year? M or Y ") if ask == "Y": CalYr() if ask == "M": CalMth() if ask == "X": break def MtplyX(): def Multiply2Numbers(): Number1 = int(input("Enter the first number? ")) Number2 = int(input("Enter the second number? ")) Solution = Number1 * Number2 print(str(Number1) + " + " + str(Number2) + "=" + str(Solution)) def MultTable(): for x in range(1, 11): for y in range(1, 11): Answer = x * y print(x, "*", y, "=", Answer) opar = input( "Would you like to Multiply 2 numbers or print tables? Table or Multiply? " ) if opar == "T": MultTable() elif opar == "M": Multiply2Numbers() else: print("Please try again") def PNC(): def PrimeNumbers(): Type = int(input("Enter a number: ")) isPrime = True if Type == "2": print("This is a prime number.") isPrime = True else: for i in range(2, int(Type)): if (Type % i) == 0: print(str(Type) + " Is Composite!!") #print(i) isPrime = False break if isPrime != False: print(str(Type) + " Is Prime!!") while True: Q = input( "Do U Want me, NCOE To Figure Out If A Number Is Prime Or Composite? (Enter Y Or N) " ) if Q == "Y": PrimeNumbers() if Q == "N": break def KOMI(): def Miles(): mi = float(input("Enter the value in Miles: ")) ratio = 1.6 km = mi / ratio print("The entered value in Kilometers: ", mi) def Kilo(): km = float(input("Enter the value in kilometers: ")) ratio = 1.6 mi = km / ratio print("The entered value in Miles: ", mi) while True: End = input( "Do you want miles to kilo or kilo to miles?(K,M and V(V is for exit))" ) if End == "M": Miles() if End == "K": Kilo() if End == "V": break def TEP(): def Temp(): temp = int(input("What is the temperature?")) if temp > 70: print("Wear Shorts") else: print("Wear long Pants") print("Get some Excersise Outside") while True: Help = ("Im T the Weather Robot,Would you like some help?") if Help == "yes": Temp() if Help == "no": break while True: print("Welcome to the Project Picker,I am Matrix the AI") Pick = input("To use the Calendar Project Press C,For the Multiply Project Press M,For the prime and composite Press P,For the kilo2miles Press K,for the temp project press R,and if you want to quit pressX C,M,P,K,R,X ") if Pick == "C": MthNYr() if Pick == "M": MtplyX() if Pick == "P": PNC() if Pick == "X": break if Pick == "K": KOMI() if Pick == "N": TEP()

AT-BASH CIPHER

my take on AT-BASH CIPHER

https://repl.it/join/nyoobkmd-supython3
#for the effects import time #asking the user to input the sentence print("") print("THIS IS THE AT-BASH CIPHER AND PRESS ENTER") time.sleep(1) print("") print("PLEASE TYPE IN LOWERCASE OR ELSE THE PROGRAM WON'T WORK") cipher = input("TYPE IN YOUR SENTENCE THAT YOU WANT TO SCRAMBLE: ") time.sleep(1) print("caculating.....") #replacing each letter cipher = cipher.replace("a", "Z") cipher = cipher.replace("b", "Y") cipher = cipher.replace("c", 'X') cipher = cipher.replace("d", 'W') cipher = cipher.replace("e", 'V') cipher = cipher.replace("f", 'U') cipher = cipher.replace("g", 'T') cipher = cipher.replace("h", 'S') cipher = cipher.replace("i", 'R') cipher = cipher.replace("j", 'Q') cipher = cipher.replace("k", 'P') cipher = cipher.replace("l", 'O') cipher = cipher.replace("m", 'N') cipher = cipher.replace("n", 'M') cipher = cipher.replace("o", 'L') cipher = cipher.replace("p", 'K') cipher = cipher.replace("q", 'J') cipher = cipher.replace("r", 'I') cipher = cipher.replace("s", 'H') cipher = cipher.replace("t", 'G') cipher = cipher.replace("u", 'F') cipher = cipher.replace("v", 'E') cipher = cipher.replace("w", 'D') cipher = cipher.replace("x", 'C') cipher = cipher.replace("y", 'B') cipher = cipher.replace("z", 'A') #displaying the ciphered text time.sleep(3) print("caculating.......") print("") time.sleep(3) print("") print("YOUR SENTENCE IS:") time.sleep(2) print("") print(cipher) print("")
A Nov 22

Interesting

1 2 ... 31