Categories
Writers Solution

Writing a Python program to compute the daily pay for an Uber driver

Instruction:

This week’s assignment involves writing a Python program to compute the daily pay for an Uber driver. 

The driver gets paid an hourly rate plus a percentage of the miles driven plus the tips provided by passengers. The driver’s daily wage is based on the number of hours worked times his hourly rate.  The commission pay is based on the total miles driven times the commission percentage rate. The daily total pay should be computed as the daily wage plus commission pay plus tips. 

Write a program that prompts the user for the following input:

  • the number of miles driven for the day,
  • the number of hours worked for the day
  • the amount of tips received for the day

and defines (not prompt) the constant values for:

  • the hourly rate for the driver (pick a reasonable value, e.g. $12.50)
  • the commission rate (pick a reasonable value e.g. 5%)

Your program should compute and display the output for:

  • the daily wage,
  • the commission pay
  • the tips for the day, and
  • the total pay for the day

Your program should include Header comments (what the program does) and in-line comments (the major design steps). Document the values you chose for the cost per paper and percentage rate in your comments as well.

Submit your Python program as a text file (.py) file. In addition, submit a Design outline and a Test plan (3 different test cases) in a Word document or a PDF file which also includes a screenshot of execution of your program for each test case.

Your submission must also adhere to the Submission Requirements document (i.e., Filename and display your name, class, date in the output).

Grading:

10% – Design – outline proper sequence of steps, calculations (if necessary). Identify values of any known constants (e.g. commission rate). Identify what the user inputs will be and what the output will be.

10% – Completeness of your Test plan (at least three test cases). Include screenshots for each test case.

10% – Documentation – Header and in-line comments. Include documentation for the values you chose as the known constants (hourly rate, commission rate) in your comments as well. Documentation of major steps (from Design outline).

70% – Program prompts and executes correctly on all test cases. Satisfies all requirements, compiles, effectiveness and neatness, descriptive variables, def main.

Important note: This is an individual assignment and students are required to submit their original/independent work and adhere to UMGC academic integrity policy. Your submission should adhere to the Submission Requirements document. It is advised that you read all the material, including the Lecture before attempting the assignment. Also, review the example programs and practice exercises. If you do not understand something, reach out to your professor or the UMGC tutor.

Order from Academic Writers Bay
Categories
Writers Solution

create a Python program that allows you to play the game “Pig.

Using the files attached create a Python program that allows you to play the game “Pig.” Please write code in the PYTHON language, not any other language. 

Below is the starter file pig_1.py code:

# Replace this comment with an appropriate header comment.

# Replace this comment with your function definitions (and any import statements you might need).

### DO NOT DELETE OR MODIFY THIS LINE: beg testing

# Testing

# print(hold_at_x_turn(12))

# simulation(12)

WE HAVE DONE THIS QUESTION BEFORE, WE CAN ALSO DO IT FOR YOU

GET SOLUTION FOR THIS ASSIGNMENT, Get Impressive Scores in Your Class

CLICK HERE TO MAKE YOUR ORDER on create a Python program that allows you to play the game “Pig.

TO BE RE-WRITTEN FROM THE SCRATCH

Categories
Writers Solution

An executable Python program

You will create an executable Python program for each task and you can finally collect them in a .py file and upload. Also provide a printout showing the results of Exercises 1, 2 and 3.
Task 1 The weierstrass.py weierstrass.py contains a function w needed for this task, so download it and place it in the same folder as the file you are about to submit. Here you need to program (Python):

  1. Plot the function w on the interval [-2, 2]. Try different values for num in np.linspace for how fine division of the x-axis in np.linspace you need to show enough details.
    Then create a function called wderivert (x, h) that uses a method that calculates the derivative in each of the points you defined in 1. for a given h = 0.001.
  2. Plot the derivative. What can you say about the function w based on what you see.
  3. Try different values of num under 30 to find your favorite graph of the derivative of w and leave this value as the final value for the division of the x-axis for all the plots.
    Task 2
    In this exercise we will use numerical integration on the function
    We will use Simpson’s rule, which approximates the function as a series of quadratic functions that go through the endpoints and midpoints of the subintervals. The figure shows Simpson’s rule for the function similar to ours at the interval [2, 8].
    You can read more about Simpson’s rule (Simpson’s rule in English) ) her. The Norwegian Wikipedia article also has some tips on how the method can be implemented, and can be read here. her. (Lenker til eit ekstern område.) Note the difference between dividing into n subintervals (plus their midpoint) and dividing into 2n subintervals (where some of the divisions are the midpoints). The latter is the method we want.
    1- Divide the interval [2, 8] into 2 equal sub-intervals and use Simpsons rule to calculate the integral.
    2- Repeat step 1, but use 5, 10, and 100 subintervals. What happens to the value of the integral? Can you guess what the true integral is? Based on the image above, what is the minimum number of sub-intervals you expect to provide a good approach? 3- Use Simpson’s rule on
    at the same interval. What do you find when you try different number of sub-intervals? Can Simpson’s formula take odd number intervals? Can you explain this?
    Task 3
    Write a Python function (not a script) that calculates the area of a circle sector. The function should take a radius, called r, and an angle given in radians, called theta (theta is the Greek letter that is also written ?) as arguments, and begins like this (a so-called docstring):

def sirkelsektor(r,theta):

Parameters
———- r : TYPE
DESCRIPTION.
theta : TYPE DESCRIPTION.
Returns
——- TYPE

DESCRIPTION.

Complete this function and test that it gives the expected answer
for r = 1, ? = 0, p, 2pr = 1, ? = 0, p, 2pr = 1, ? = 0, p, 2p. What happens if someone uses this feature but specifies the angle in degrees instead of radians? Do we get an error message?

GET THE COMPLETED ASSIGNMENT

ASSIGNMENT COMPLETED AT CapitalEssayWriting.com

MAKE YOUR ORDER AND GET THE COMPLETED ORDER

CLICK HERE TO ORDER THIS PAPER AT CapitalEssayWriting.com ON An executable Python program

NO PLAGIARISM, Get impressive Grades in Your Academic Work

Categories
Writers Solution

Python Programmingwe want to play a game of Yahtzee.

Python Programmingwe want to play a game of Yahtzee. It is a popular game played with 5 six-sided dices. In each turn, he rolls all five dice, and he keeps a count of the number of turns needed until he sees sixes on all five dice. He wonders how many turns are needed in expectation to roll 5 sixes. Taking what was talked about in Introduction to Scientific Programming about computing probabilities and expectations, he wants to write a program that computes this. Please write a program yahtzee.py that computes the expected number of tries to win at Yahtzee. You may write a single function named experiment that rolls five dice over and over until all of them are sixes. This function should return the number of turns needed until all sixes are rolled. You can then call this function many times and take the average over 1000 games of Yahtzee. 

The expected output is shown below. Sample Output: In expectation, it takes 7768.991 attempts to roll 5 sixes. For full credit, the answer should be plus or minus 500 from 7700, and it should take between 20 and 30 seconds to run.

  • GET SOLUTION FOR THIS ASSIGNMENT

    CLICK HERE TO MAKE YOUR ORDER

    TO BE RE-WRITTEN FROM THE SCRATCH

    NO PLAGIARISM

    • Original and non-plagiarized custom papers. Our writers develop their writing from scratch unless you request them to rewrite, edit or proofread your paper.
    • Timely Delivery. capitalessaywriting.com believes in beating the deadlines that our customers have imposed because we understand how important it is.
    • Customer satisfaction. Customer satisfaction. We have an outstanding customer care team that is always ready and willing to listen to you, collect your instructions and make sure that your custom writing needs are satisfied
    • Privacy and safety. It’s secure to place an order at capitalessaywriting.com We won’t reveal your private information to anyone else.
    • Writing services provided by experts. Looking for expert essay writers, thesis and dissertation writers, personal statement writers, or writers to provide any other kind of custom writing service?
    • Enjoy our bonus services. You can make a free inquiry before placing and your order and paying this way, you know just how much you will pay. Python Programmingwe want to play a game of Yahtzee. 
    • Premium papers. We provide the highest quality papers in the writing industry. Our company only employs specialized professional writers who take pride in satisfying the needs of our huge client base by offering them premium writing services.

    Get Professionally Written Papers From The Writing Experts 

    Green Order Now Button PNG Image | Transparent PNG Free Download on SeekPNG Our Zero Plagiarism Policy | New Essays