I need help adjusting code already written to incorporate some other factors,

Question

I need help adjusting code already written to incorporate some other factors,

style=”color:rgb(45,59,69);”>I need to add a list that keeps track of all the numbers guessed and modularizes the code.

I also need to be able to input a number and see if the computer can guess it.

Below is the code I need to add the items to.

Please assist!

import random

Name=input(“Name: “)

Date=input(“Date: “)

def numberGuessingGame(myGuess, num):

if myGuess > num:

print(‘Too high’)

elif myGuess < num:

print(‘Too low’)

def main():

print(‘Welcome to my Guess the number program!’)

num = random.randint(1, 10)

count=0

while True:

print(‘nWho will guess the number?n1.Usern2.Computer’)

choice=input(‘=> ‘)

if choice==’1’:

guess_num=int(input(‘Please guess a number between 1 and 10: ‘))

numberGuessingGame(guess_num,num)

count=count+1

elif choice==’2’:

guess_num = random.randint(1, 10)

numberGuessingGame(guess_num,num)

count=count+1

else:

print(‘Wrong choice!’)

if guess_num == num:

print(‘You guessed it! It took’,count, ‘attempts’)

break

main()

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

MyProgrammingLab Week 7 Chapter 16 70047

MyProgrammingLab

Week 7

Chapter 16

70047

The answer I get when I use Visual

Studio, is not the same answer this lab is looking for. I need to see how the answer needs to be formatted for myprogramminglab.

I am trying to figure out how the answers need to be formatted for these types of problems. templates for the two functions minimum and maximum. The minimum function should accept two arguments and return the value of the argument that is the lesser of the two. The maximum function should accept two arguments and return the value of the argument that is the greater of the two.

Test your functions in a main program that propmts the user to choose what type of data they would like to compare (ints, doubles, or strings). Then, it should ask the user to enter two arguments, as well as whether they would like to know the minimum or the maximum. Then, it should print the minimum or maximum of the two arguments

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

Rectangle class that has the following member variables: •        length •        width

Rectangle class that has the following member

variables:

•        length

•        width

The class should have the following member functions:

•        Default constructor that sets length and width to 0.0

•        Constructor that accepts the length and width as arguments

•        setLength, a mutator function for the length variable

•        getLength, an accessor function for the length variable

•        setWidth, a mutator function for the width variable

•        getWidth, an accessor function for the width variable

•        calculateArea, returns area, which is calculated as area = length × width

•        calculatePerimeter, returns perimeter, which is calculated as perimeter = 2 × length + 2 × width

Need help getting this started and how to set up the rest of the class and parameters

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

Please put together program that calculates the total cost of an order including shipping

Please put together program that calculates the total cost of an order including shipping

Use

the following table to calculate shipping cost:

Cost of Items

Shipping Cost

< $30.00

$5.95

$30.00 – $49.99

$7.95

$50.00 – $74.99

$9.95

> $75.00

Free

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