diff --git a/Simple-Multitasking-Python-Game-1st-repo--main/LICENSE b/Simple-Multitasking-Python-Game-1st-repo--main/LICENSE new file mode 100644 index 0000000..146e0d2 --- /dev/null +++ b/Simple-Multitasking-Python-Game-1st-repo--main/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Quint Symonette + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Simple-Multitasking-Python-Game-1st-repo--main/README.md b/Simple-Multitasking-Python-Game-1st-repo--main/README.md new file mode 100644 index 0000000..ba25153 --- /dev/null +++ b/Simple-Multitasking-Python-Game-1st-repo--main/README.md @@ -0,0 +1,20 @@ +# Simple-Multitasking-Python-Game-1st-repo- +A python code utilizing some of the basic fundamentals such as variables, functions, and loops to create a simple console-based app that performs numerous tasks. These tasks include a few traditional games such as rock, paper, scissors, and guess which card. + +Developed in the Spyder IDE. + +To use, view the menu upon running the program- 5 mini-terminal game options will appear alnog with a 6th option to quit the program; otherwise it'll remain in a loop. + +Press any number between 1-5 to play your game of choice or 6 to quit. + +Game 1 is rock paper scissors - type 1 for rock, 2 for scissors, 3 for paper; the algorithm will choose a random one out of the three. You'll immediately be notified if you win or lose; the cycle repeats three times. + +Game 2 is a guessing game of whether pixel car 1 or 2 will be faster; simply type 1 or 2 for the result. + +Game 3 is card guessing. The program will pick a card and you have to guess which one it is out of the deck; it'll tell you how many tries you took to get it right. Guess by typing the card name(e.g. A, 2, 5, K, etc.) + +Game 4 involves viewing Pokemon names under corresponding elements and choosing one from 3 element groups by selecting the number before the Pokemon's name (if '1 Pikachu' - type 1); the program will do the same, and at the end, the 'attack power' stats of both teams will be displayed. (Major work in progress - any ideas would be amazing!) + +Game 5 is a 5-round math game in which both you and the program enter a number between 1 and 60. The algorithm will multiply both numbers by random values - the number with the highest product will be declared the winner. The same highest number result wins rule applies for every other round, but round 2 is addition, round 3 is division, round 4 is subtraction, round 5 is exponents and the 6th and final round is modulus (%) or remainder values. + +To run, download the game hub.py, navigate to the directory in which you downloaded it, and run on python 3. diff --git a/Simple-Multitasking-Python-Game-1st-repo--main/the game hub.py b/Simple-Multitasking-Python-Game-1st-repo--main/the game hub.py new file mode 100644 index 0000000..517068d --- /dev/null +++ b/Simple-Multitasking-Python-Game-1st-repo--main/the game hub.py @@ -0,0 +1,377 @@ +# -*- coding: utf-8 -*- +""" +Created on Sat Aug 3 20:39:00 2024 + +@author: quint +""" + +#Game Station +import random + + + +#go-ahead + +#R/P/S +def Rock_Paper_Scissors(): + print('Game 1 = Rock/Paper/Scissors') + print('1 for rock') + print('2 for scissors') + print('3 for paper') + me = int(input()) + ai = random.randint(1,3) + print(ai) + if me >=1 and me <=3: + if me ==1: + print('me: Rock') + elif me ==2: + print('me: Paper') + else: + print('me: Scissors') + if ai ==1: + print('ai: Rock') + elif ai ==2: + print('ai: Paper') + else: + print('ai: Scissors') + + #Outcome + + if me==1 and ai==3: + print('U win') + elif me==2 and ai==1: + print('U win') + elif me==3 and ai==2: + print('U win') + elif ai==2 and me==1: + print('U lose') + elif ai==1 and me==3: + print('U lose') + elif ai==3 and me==2: + print('U lose') + else: + print('Tie!') + else: + print('only enter numbers between 1 and 3') + + + + + +#cars +def fast_cars(): + + car1=random.randint(5,20) + car2=random.randint(5,20) + print(' Do you think car 1 or 2 is faster?') + print() + print('Only enter 1 or 2; all other numbers and words are invalid.') + print() + +#car1 + print('car1') + print('\t\t________|') + print('\t\t/-------\\') + print('\t________________') + print('\t|\t__\t|\t__\t|') + print('\t\to\t\to\t') + print() + print('car2') +#car2 + print('\t--------------------') + print('\t|___________________|\\') + print('\t\\__________________///') + print('\t\t\t0\t\t\to\t\t') + bet=int(input()) + try: + if bet<1 or bet>2: + print('There are only two cars; Only numbers pls to avoid errors!') + bet=int(input()) + except: + bet=int(input()) + + print('\t'*car1,'\t\t________|') + print('\t'*car1,'\t\t/-------\\') + print('\t'*car1,'\t________________') + print('\t'*car1,'\t|\t__\t|\t__\t|') + print('\t'*car1,'\t\to\t\to\t') + + print('\t'*car2,'\t--------------------') + print('\t'*car2,'\t|___________________|\\') + print('\t'*car2,'\t\\__________________///') + print('\t'*car2,'\t\t\t0\t\t\to\t\t') + if bet==1 and car1>car2: + print('U were right congratulations') + elif bet==2 and car1=0 and p1 <=5: + print(flame[p1]) + my_Team.append(flame[p1]) + flame.remove(flame[p1]) + print(flame[p2]) + enemy_Team.append(flame[p2]) + flame.remove(flame[p2]) + else: + print('error...there are only 6 pokemon; choose 0-5') + break + + elif round==2: + + if p1 >=0 and p1 <=5: + print(wave[p1]) + my_Team.append(wave[p1]) + wave.remove(wave[p1]) + print(wave[p2]) + enemy_Team.append(wave[p2]) + wave.remove(wave[p2]) + else: + print('error...there are only 6 pokemon; choose 0-5') + break + else: + + if p1 >=0 and p1 <=5: + print(thunder[p1]) + my_Team.append(thunder[p1]) + thunder.remove(thunder[p1]) + print(thunder[p2]) + enemy_Team.append(thunder[p2]) + thunder.remove(thunder[p2]) + else: + print('error...there are only 6 pokemon; choose 0-5') + break + print('Your team:',my_Team,'----Total health=',num1,'Total attack power=',num3) + print('Rival team:',enemy_Team,'----Total health=',num2,'Total attack power=',num4) + + + +#calculator +def calculator(): + count=0 + c=random.randint(2,5) + y=random.randint(2,5) + cc=random.randint(7,800) + yy=random.randint(7,800) + ccc=random.randint(3,30) + yyy=random.randint(3,30) + c4=random.randint(5,35) + y4=random.randint(5,35) + fc=random.randint(1,10) + fy=random.randint(1,10) + while count <= 5: + print() + print("Enter a number between 1 and 60:") + p1=int(input()) + p2=random.randint(1,60) + print(p2) + count+=1 + if p1>0 and p1<=60: + if count==1: + print('Round 1--multiplication') + v=p1*c + print('Your product=',v) + z=p2*y + print('aI product=',z) + if v>z: + print('u win round 1') + elif v=1 and c<=6: + print('Get Ready To Play Game',c) + + if c==1: + print('Welcome to Rock, Paper, Scissors!') + round=0 + while round<3: + Rock_Paper_Scissors() + print() + round +=1 + elif c==2: + print('Do you know how to drive?') + fast_cars() + elif c==3: + print('draw your card!') + deck_o_cards() + print() + elif c ==4: + print('Pokemon Go!') + print() + Pokemon() + print() + elif c==5: + print('Calculator Games--Random Values') + print('For each round, enter a random number to play') + print() + calculator() + print() + elif c==6: + print('\nGame ended!') + else: + print('Only numbers between 1 and 6 pls') + print('Try Again...') + print() + print() + + + +#launch main if this is not a support file +if __name__=="__main__": + main() + + +