Call us 24/7: + 1(925)399 0085

Get your paper done by an expert

No matter what kind of academic paper you need, it is simple and secure to hire an essay writer for a price you can afford at StudyAcer. Save more time for yourself.

WhatsApp + 1(925)399 0085
$ 10
free
  • bibliography
  • title page
  • revisions
per page
19 k happy customers
4.7 out of 5 satisfaction rate
27 writers active

need help with python 2

Overview

This lab reviews previous concepts involving loops.

Python Functions and Scripts

Write and test Python functions for each of the following. When writing a function, include a docstring.

  1. Implement the function color_gallery that takes as a parameter a list of strings, each indicating a browser-compliant color. The function should generate and display a web page that shows all pair-wise combinations of colors from the list. Your generated page should have appropriate text labels for each displayed color. The actual formatting is up to you, provided that it’s reasonable.
  2. Craps is a dice-based game played in many casinos. Like blackjack, a player plays against the house. The game starts with the player throwing a pair of standard, six-sided die. If the player rolls a total of 7 or 11 in the first round, the player wins. If the player rolls a total of 2, 3, or 12 in the first round, the player loses. For all other roll values, the player must roll again to determine whether he/she has won or lost. In the second and subsequent rounds the player rolls the pair of dice again. If the player matches the roll value from the first round again, he/she wins. If the player rolls a 7, he/she loses. Play continues into another round until the initial roll is matched (for a win) or a 7 is rolled (for a loss).
    1. Write a function craps that takes no parameters, simulates one game of craps, and returns 1 if the player won and 0 if the player lost. It should also print a history of the rolls so that the player can verify that the function is doing the right thing.
    2. Next modify craps by adding an optional parameter to it so that craps(True) produces the print output but that craps(False) does not. If it is called without a parameter, it should behave as described in the previous part (i.e. make its default value set to True). Finally, write a new function called quietCraps that doesn’t take any argments and simply returns 0 or 1 without the print results. The quietCraps function should simply make an appropriate call to craps.
    3. Finally, implement a function testCraps that takes a positive integer n as a parameter, simulates n games of craps using the quietCraps function, and returns the fraction of games the player won. The function must call the quietCraps function.

    PLEASE LOOK at the Attachment follow the format.

Our guarantees

Study Acers provides students with tutoring and help them save time, and excel in their courses. Students LOVE us!No matter what kind of essay paper you need, it is simple and secure to hire an essay writer for a price you can afford at StudyAcers. Save more time for yourself. Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Our Homework Writing Disciplines

With a highly diverse team in almost all academic fields including:


Warning: Invalid argument supplied for foreach() in /home/acemfljg/public_html/wp-content/themes/essay-writing/footer.php on line 12