Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED HELP TO CODE THESE TWO PROGRAMS SO THEY LOOK LIKE THE PICTURES. ALSO THERE IS SPECIFICATION LISTED THAT ARE REQUIRED TO BE WITHIN

I NEED HELP TO CODE THESE TWO PROGRAMS SO THEY LOOK LIKE THE PICTURES. ALSO THERE IS SPECIFICATION LISTED THAT ARE REQUIRED TO BE WITHIN THE CODE FOR THE PROGRAM.....

image text in transcribed

image text in transcribed

Create a program that uses a function to simulate the roll of a die Console Dice Roller Roll the dice? (y): y Die 1: 3 Die 2: 6 Total: 9 Roll again? (y): y Die 1: 1 Die 2: 1 Total: 2 Snake eyes! Roll again? (y): y Die 1: 6 Die 2: 6 Total: 12 Boxcars! Roll again? (y): n Specifications The program should roll two six-sided dice Store the code that rolls a single die in a function Store the code that gets input and displays output in the main function. Whenever it's helpful, use helper functions to split this code into other functions The program should display a special message for two ones (snake eyes) and two sixes (boxcars) Sales Tax Calculator ENTER ITEMS (ENTER 0 TO END) Cost of item: 35.99 Cost of item: 27.50 Cost of item: 19.59 Cost of item: 0 Total: Sales tax: Total after tax: 88.06 83.08 4.98 Again? (y): y ENTER ITEMS (ENTER 0 TO END) Cost of item: 152.50 Cost of item: 59.80 Cost of item: 0 Total: Sales tax: Total after tax: 225.04 212.3 12.74 Again? (y): n Thanks, bye! Specifications " The sales tax rate should be 6% of the total Store the sales tax rate in a module. This module should also contain functions that calculate the sales tax and the total after tax. These functions should round the results to a maximum of two decimal places. Store the code that gets input and displays output in another module. Divide this code into functions wherever you think it would make that code easier to read and maintain Assume the user will enter valid data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions