This question was created from CIS115_Week 5_Lab.docx https://www.coursehero.com/file/34328155/CIS115-Week-5-Labdocx
This question was created from CIS115_Week 5_Lab.docx https://www.coursehero.com/file/34328155/CIS115-Week-5-Labdocx/
This question was created from CIS115_Week 5_Lab.docx https://www.coursehero.com/file/34328155/CIS115-Week-5-Labdocx/

34328155-264966.jpeg
Chevy by 0.4 sec
And the winning team is: F 0 R D I Specifications: I Accept the racing times for each of the Chevy cars into the array Chevy[ ]. I Accept the racing times for each of the Ford cars into the array Ford[ ]. 0 Then declare the wining car for each race, giving the winning time in seconds.
0 If the times are identical. then declare the race was a tie. 0 Finally, declare which team won the match, assuming a tie is possible
number. The pseudocode is below. Be sure to import random at the beginning of your code and use a comment block explaining what your program does
#Guess the number week 5
#Name:
#Date:
#Random number, loop while true
#ask user for number. Check to see if the value is a number between 1 and 10
#if number is too high or too low, tell user, if they guessed it break out of loop
Display “Welcome to my Guess the number program!”
random mynumber
count=1
while True
try
Display “Guess a number between 1 and 10”
Get guess
while guess<1 or guess>10
Display “Guess a number between 1 and 10”
Get guess
except
Display “numbers only”
continue
if (guess<mynumber)
Display “Too low”
count=count+1
else if (guess>mynumber)
Display “Too high”
count=count+1
else if (guess==mynumber)
Display “You guessed it in “+ count + ” attempts”
When you run the program the result should look like the following:
Welcome to my Guess the number program!
Please guess a number between 1 and 10: a
Numbers only!
Please guess a number between 1 and 10: -3
Please guess a number between 1 and 10: 4
Too low
Please guess a number between 1 and 10: 5
Too low
Please guess a number between 1 and 10: 6
You guessed it! It took you 3 attempts
This question was created from CIS115_Week 6_Lab.docx https://www.coursehero.com/file/35739120/CIS115-Week-6-Labdocx/

35739120-268248.jpeg
Specifications :"
The program should start with 2 items in the shopping list .
Don’t forget to include at the end of the program the code :
O if_ name_ = ="_ main_ " :
main ( ) ;
.
Use this code for the delete_ item ( shopping _ list ) function :"
def delete_ Item ( shopping_ list ) ."
number = int ( input (" Which number to delete : " ) )
if number<I or number > Ien ( shopping _ List ) :
print ( " Invalid numberin " )
else ."
I t em = shopping _ List . pop ( number – 1 )
print ( item , " was deletedin " )
print ( )
list.
Deliverables
-Steps
The program should be modular. For example, you will want to have an add_item(shopping_list) function, a delete_item(shopping_list) function, a display_list(shopping_list) function, a display_menu() function, and a main().
Sample Output:
Welcome to the program!
1. Add an item
2. List all items
3. Delete an item
4. Exit
Enter a menu option: 2
1 : bananas
2 : apples
Enter a menu option: 1
Please enter the item: pears
pears was added to the shopping list
Enter a menu option: 2
1 : bananas
2 : apples
3 : pears
Enter a menu option: 3
Which number to delete: 3
pears was deleted
Enter a menu option: 2
1 : bananas
2 : apples
Enter a menu option: 4
have a great day!
Specifications:
· The program should start with 2 items in the shopping list.
· Don’t forget to include at the end of the program the code:
o if __name__ == “__main__”:
main();
· Use this code for the delete_item(shopping_list) function:
def delete_item(shopping_list):
number=int(input(“Which number to delete: “))
if number<1 or number>len(shopping_list):
print(“Invalid numbern”)
else:
item=shopping_list.pop(number-1)
print(item,” was deletedn”)
print()
![]()
Since 2010, we have offered professional writing services to clients all over the world.
Over the years, our writers have gained solid experience in all academic disciplines, giving them a competitive edge to provide only first-rate academic papers.
![]()
For any questions, feedback, or comments, we have an ethical customer support team that is always waiting on the line for your inquiries.
support@academicheroes.com
Call us: +1 (203) -677 0547
Hi there! Chat/Order through WhatsApp.