[SOLVED] need help with python

I’m stuck on a Python question and need an explanation.

Struggling to find relevant content or pressed for time? – Don’t worry, we have a team of professionals to help you on
[SOLVED] need help with python
Get a 15% Discount on this Paper
Order Now

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.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
Sign up, place your order, and leave the rest to our professional paper writers in less than 2 minutes.
step 1
Upload assignment instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
s
Get personalized services with MyCoursebay
One writer for all your papers
You can select one writer for all your papers. This option enhances the consistency in the quality of your assignments. Select your preferred writer from the list of writers who have handledf your previous assignments
Same paper from different writers
Are you ordering the same assignment for a friend? You can get the same paper from different writers. The goal is to produce 100% unique and original papers
Copy of sources used
Our homework writers will provide you with copies of sources used on your request. Just add the option when plaing your order
What our partners say about us
We appreciate every review and are always looking for ways to grow. See what other students think about our do my paper service.
Social Work and Human Services
Excellent work
Customer 452587, September 4th, 2021
Nursing
They so amazing work!!
Customer 452707, January 29th, 2023
Criminal law
Thank You!
Customer 452465, January 29th, 2021
Nursing
Another great paper! Thank you!
Customer 452707, June 16th, 2022
Strategic Management
Thank you very much for the help, really appreciate it
Customer 452821, June 27th, 2022
Nursing
Not all sources were " American sources" as directed
Customer 452615, September 16th, 2021
Human Resources Management (HRM)
Thank you so much. Well written paper.
Customer 452701, September 25th, 2023
Technology
The paper is everything I needed and more. I will add a title and a cover page to it. Other than that the paper turned out excellent.
Customer 452885, October 17th, 2022
Technology
My paper was sent back after my due date time
Customer 452901, November 12th, 2022
Nursing
Great paper!
Customer 452707, June 29th, 2023
Wellness
The skilled writer did a GREAT job on assignment. There are a few details I will add, but overall very happy with their work. Thank you
Customer 452547, June 13th, 2021
Business and administrative studies
GREAT
Customer 452813, June 20th, 2022
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat

Good News ! We now help with PROCTORED EXAM. Chat with a support agent for more information