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

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

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

you will add input validation and a count to show how many guesses the user took before getting the correct

you will add input validation and a count to show how many guesses the user took before getting the correct

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

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

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

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

35739120-268248.jpeg

35739120-268248.jpeg

Specifications :&quot;
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_ = =&quot;_ main_ &quot; :
main ( ) ;
.
Use this code for the delete_ item ( shopping _ list ) function :&quot;
def delete_ Item ( shopping_ list ) .&quot;
number = int ( input (&quot; Which number to delete : &quot; ) )
if number&lt;I or number &gt; Ien ( shopping _ List ) :
print ( &quot; Invalid numberin &quot; )
else .&quot;
I t em = shopping _ List . pop ( number – 1 )
print ( item , &quot; was deletedin &quot; )
print ( )

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

It is a program that will allow a user to add, list, and delete items from a shopping list.

It is a program that will allow a user to add, list, and delete items from a shopping

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()

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"