Python program.
I need to get the below output and the go,set,look,go must be taken from a list. And these are functions are only used. while, for, if elif else,.remove().append(). ONLY. cannot use continue, break,pass.
Other thing is it's given according to the order. if the user put the wrong input then if should say "Wrong" and if should do until he put the correct order. (in this case 1)
Thank you and put commects if possible. Take your time
******
these are the options for you
1 --- ready
2 --- set
3 --- look
4 --- go
which option do you choose? 1
1 --- set
2 --- look
3 --- go
which option do you choose? 1
1 --- look
2 --- go
which option do you choose? 1
1 --- go SOURCE CODE:
l=["ready","set","look","go"] #list l contains 4 elements
print("******") #printing 6 stars
while(len(l)!=0): #while loop until list becomes empty
print("these are the options for you\n") #printing statments
for i in range(len(l)): #iterating over list of elements
print((i+1),"---",l[i]) #printing list of elements as options to
user
option=int(input("which option do you choose? ")) #reading option
from user
if(option==1): #if option==1 then
l.remove(l[option-1]) #removing element from list
elif(option!=1): #if option not equal to 1 then
print("Wrong") #printing "Wrong" stament to console
CODE SCREENSHOT:
OUTPUT:

Python program. I need to get the below output and the go,set,look,go must be taken from...
Write a Python program (rock_paper_scissors.py) that allows two players play the game rock paper scissors. Remember the rules: 1. Rock beats scissors 2. Scissors beats paper 3. Paper beats rock The program should ask the users for their names, then ask them for their picks (rock, paper or scissors). After that, the program should print the winner's name. Note, the players may pick the same thing, in this case the program should say it's tie. when the user input an...
attention!!!!!!! I need python method!!!!!!!!!
the part which need to edit is below: i need python
one!!!!!!!!!
the part below is interface for the range search tree which
don’t need to modify it.
Week 3: Working with a BST TODO: Implement a Binary Search Tree (Class Name: RangesizeTree) Choose one language fromJava or Python. Iin both languages,there is an empty main function in the Range Size Tree file. The main function is not tested, however, it is provided for you...
Need help with Python (BinarySearch), code will be below after my statements. Thank you. Have to "Add a counter to report how many searches have been done for each item searched for." Have to follow this: 1) you'll create a counter variable within the function definition, say after "the top = len(myList)-1" line and initialize it to zero. 2) Then within the while loop, say after the "middle = (bottom+top)//2" line, you'll start counting with "counter += 1" and 3)...
Python Language: Please see program listed below of a game called: Rock, Paper, Scissors. Please add an exception, for example if the user inputs something else other than rock, paper or scissors, the exception will print message: "Enter only rock, paper, or scissors". Also add option to keep playing the game, for example: print: "Would you like to play again? Enter Y or N". If the user says Y, the game will repeat, if N, the game will end and...
Module 6 - Cash Register (10 Points) We are going to write a program that simulates a customer's transaction at a cash register. You will organize your code using functions. Each of the functions below counts for 2 points. You must create functions allowing the user to: 1. Add an item to the order. No name or list of items is needed simply prompt the user for a dollar amount to add. 2. Clear all transactions. Set the amount of...
11.2 Problem Set 2: PostScript Stack Commands (in python please) For this assignment you are to implement a PostScript command interpreter using a Stack. You must implement the stack using a singly-linked list. Solutions that use a data structure other than a singly-linked list will received no credit. The interpreter must read and execute a string of PostScript commands based on the following definitions: 1. = objn objn-1 … obj1 = : objn-1 … obj1 This command removes the topmost...
Programming Language is
Python
Need it to look just like the sample output. pls and
ty!!
Design your solution: 1. Main menu: Create a main user menu to display the main options to the user. User have the option to choose between 1 and 4. The program will display an error message if user option is not within the valid selection (less than 1 and greater than 4). Think about using a conditional structure to serve the user choice. Invalid...
Python
Consider the GUI below (3 Labels and 3 Radiobuttons) which has
been produced with a Python program using the Tkinter
library.
You are required to write a Python program to produce this
interactive GUI.
Your GUI must replicate the example above as closely as
possible, including the same widgets displayed in the sample
positions on the GUI, using the same colours, shapes and relative
sizes. (Note that the GUI border in the sample output does not need
to be...
Something is preventing this python code from running properly.
Can you please go through it and improve it so it can work. The
specifications are below the code. Thanks
list1=[]
list2=[]
def add_player():
d={}
name=input("Enter name of the player:")
d["name"]=name
position=input ("Enter a position:")
if position in Pos:
d["position"]=position
at_bats=int(input("Enter AB:"))
d["at_bats"] = at_bats
hits= int(input("Enter H:"))
d["hits"] = hits
d["AVG"]= hits/at_bats
list1.append(d)
def display():
if len(list1)==0:
print("{:15} {:8} {:8} {:8} {:8}".format("Player", "Pos", "AB",
"H", "AVG"))
print("ORIGINAL TEAM")
for x...
I have to write this in Python and it must run in Python 3.
The last two pictures are what I have so far please correct me if
anything I have written so far is wrong.
anything interesting 6.8. Do addition Summary Now you will replace the pass statement inside the addition case of the iflelif ladder with something that actually does addition. Since the only number we have right now is the accumulator, you will need to ask the...