#MENU PROGRAM #Selection Sort from random import * def SelectionSort(): arr=[] n=int(input("Enter Size of Array")) arr=[n] for i in range(n): x=randint(0,50) arr.append(x) print("List to Sort : ",print(arr)) for i in range(n): p=i for j in range(i,n+1): if arr[p]>arr[j]: arr[p],arr[j]=arr[j],arr[p] print("Your Sorted Array Looks Like ",(arr)) #Bubble Sort def BubbleSort(): arr=[] n=int(input("Enter Size of Array")) arr=[n] for i in range(n): x=randint(0,50) arr.append(x) print("List to Sort : ",print(arr)) for i in range(n): ...
print('='*50) print("Welcome to ROCK PAPER SCISSOR GAME!!!") print('='*50) print("You have to input in the following way : ") print("0===>Rock") print("1===>Paper") print("2===>Scissor") n=int(input("Enter No. of Rounds : ")) rps=["Rock","Paper","Scissor"] from random import * cs=hs=0 s=0 while n!=0: s+=1 print("Welcome to ROUND NO.#",s) j=randint(0,2) ci=j n=n-1 print("0===>Rock") print("1===>Paper") print("2===>Scissor") x=int(input("Enter Your Choice (0,1,2) : ")) if x==0 and ci==0: print("I did : ",rps[ci]) print("U did : ",rps[x]) print("It's a tie...COME AGAIN") print("Scores @ the end of this round are...") print("Me | Human") print(cs," ",hs) ...
Comments
Post a Comment