### Ans Doc215

Pizza Party Your user is throwing a pizza party and must determine if they have enough pizza to feed their guests. Givens: How many pizzas did you order? How many slices per pizza? How many guests will be at the party? How many slices will each guest eat? Result To Print Out: “Yes, you have enough pizza for your guests with X slices left over.” or “You need at least X more slices of pizza. You should order more pizza.” Problem #3: Discount Double Check You are going to purchase (2) items from an online store. If you spend \$100 or more, you will get a 10% discount on your total purchase. If you spend between \$50 and \$100, you will get a 5% discount on your total purchase. If you spend less than \$50, you will get no discount. Givens: Cost of First Item (in \$) Cost of Second Item (in \$) Result To Print Out: “Your total purchase is \$X.” or “Your total purchase is \$X, which includes your X% discount.” Problem #4 – Logical Operators: Movie Ticket Price The local movie theater in town has a ticket price of \$12.00. But, if you are a senior (55 and older), or are under 10, or are seeing a matinee which screens from 3 pm to 5 pm, you get the discounted price of \$7.00, nice! Hint 1: “55 and older” is INCLUSIVE Hint 2: under 10 is EXCLUSIVE Hint 3: the range 3 to 5 is INCLUSIVE Hint 4: limit 1 per patron (i.e., it doesn’t compound) Hint 5: considering there’s 3 am and pm and 5 am and pm, using a 24-hour clock (aka military time) may be an easier option (0000 to 2359) Determine which of the two prices the customer is eligible for. Givens: Time of Movie (Assume whole numbers here) Age of the customer Result To Print Out: “The ticket price is X”

### Ans Doc213

Write a program that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer values that represent the number of quarters, dimes, nickels, and pennies. This program will require user input, output needs to have the correct currency format without using the currency formatting code.

use the for statement to iterate on the ratings list and subtract each rating score by 3.5, then store the subtracted value inside a new list.

use this list of rating scores: 2,2,3,3,3,4,4,4,5,5
Pseudocode:
Set the variable with the list of rating scores
Initialize a list variable named mean deviations
use the for statement to iterate through the rating scores
Subtract the score by 3.5 then store it in mean deviations.
Display the mean deviations list.

### Ans Doc212

Nicole sells custom made necklaces. It calls Nicole \$8.00 to make each necklace. She also pays \$175 each month To rent her store Front to sell her necklaces. Nicole sells each necklace for \$15.00. Write and solve an inequality that can be used to determine the number of necklaces (n)Nicole my cell each month in order to make a profit for the month

### Ans Doc211

Consider a 12 kg block that is stacked on top of a 30 kg block. An upward 929 N force is applied underneath the bottom block and the pair is accelerated into the sky! Calculate the normal force between the blocks, in N. Use g= 10 m/s^2

### Ans Doc210

Returns True after converting the image to monochrome.
All plug-in functions must return True or False. This function returns True because it modifies the image. It converts the image to either greyscale or sepia tone, depending on the parameter sepia.
If sepia is False, then this function uses greyscale. For each pixel, it computes the overall brightness, defined as 0.3 * red + 0.6 * green + 0.1 * blue.
It then sets all three color components of the pixel to that value. The alpha value should remain untouched.
If sepia is True, it makes the same computations as before but sets green to
0.6 * brightness and blue to 0.4 * brightness.
Parameter image: The image buffer Precondition: image is a 2d table of RGB objects
Parameter sepia: Whether to use sepia tone instead of grayscale Precondition: sepia is a bool
# We recommend enforcing the precondition for sepia
# Change this to return True when the function is implemented
height = len(image)
width = len(image[0])
for row in range(height):
for col in range(width):
pixel = image[row][col]
pixel.red = int(0 * 0.3)
pixel.green = int(1*0.6)
pixel.red = int(2*0.1)
pixel.red+pixel.green+pixel.blue