1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Snezhnost [94]
2 years ago
12

A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input, output the subtotal for the

pizzas, and then output the total after applying a sales tax of 6%. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('Subtotal: ${:.2f}'.format(yourValue))
Computers and Technology
1 answer:
storchak [24]2 years ago
8 0

The program requires a sequence control structure

The sequence control structure implies that, the program does not include any conditional statement, and it does not include iterative or repetitive operations.

The complete code in Python, where comments are used to explain each line is as follows:

#This gets input for the number of pizza from the user

count = int(input("Number of Pizza: "))

#This calculates the subtotal (<em>without tax</em>)

Subtotal = count * 9.99

#This calculates the total (<em>with tax</em>)

Total = Subtotal * 1.06

#This prints the subtotal

print('Subtotal: ${:.2f}'.format(Subtotal))

#This prints the total

print('Total: ${:.2f}'.format(Total))

At the end of the program, the total and the subtotal are calculated and printed.

See attachment for sample run

Read more about similar programs at:

brainly.com/question/14839980

You might be interested in
A teacher wants a program to give extra points to students who fail a test. Write a Python program to do the following: (a) Ask
Lorico [155]

Answer:

Hi there! Please find the answer below.

Explanation:

The program below demonstrates how each of the requirements can be coded in a simple Python script. To copy the array, we can use the copy() method of the array. To calculate the diff, we can use a few different techniques, so I have implemented it using a loop over the arrays and just storing and displaying the difference in the 2 arrays.

new_string.py

def add_test_score(score):

 test_score.append(score);

contact_hash = {}

test_score = []

print("Enter 5 test scores: ");

for x in range(0, 5):

   input_string = input("Enter test score " + str(x + 1) + ": ")

   add_test_score(int(input_string));

print(test_score);

test_score_copy = test_score.copy();

for e in test_score_copy:

   if e < 60:

       test_score_copy[test_score_copy.index(e)] += 10;

diff = [];

for e in test_score:

   print(test_score[test_score.index(e)]);

   print(test_score_copy[test_score.index(e)]);

   if not test_score[test_score.index(e)] == test_score_copy[test_score.index(e)]:

       diff.append(e);

print(diff);

8 0
3 years ago
You are setting up your Windows computer to connect to the Internet and notice that when you type www.microsoft, the browser doe
Harrizon [31]

Answer:

Check your DNS settings

Explanation:

Different errors may occur when setting up your computer to connect to the internet, one of which is described in the question above.

The DNS (Domain Name System) is responsible for redirecting domain names to their physical IP address. Instead of remembering every IP address of sites you visit frequently, domain names are used for easy remembrance, the DNS makes the matching of domain names to IP addresses possible.

To change your DNS setting follow these steps:

  1. Click settings from your start menu
  2. Click on Network and Internet
  3. Look to the bottom of the main page and click on "Network and Sharing Center"
  4. On the left tab, click "Change adapter settings"
  5. Right Click on the current network you are using and select properties
  6. Left-click on the "Internet Protocol Version 4 (TCP/IPv4) and click on properties.
  7. Check to see if "Obtain DNS server address automatically" is selected, if it is selected,
  8. Click on the radio button under it "Use the following DNS server address"
  9. Enter the DNS address you want to use
  10. Click Ok and close the window.

The problem should be resolved.

4 0
3 years ago
Consider tree from the lectures on slide 10, write down the nodes in order as pro-
Leto [7]
The work same to be level order traverse and the sea is completely
7 0
3 years ago
Write a program that accepts a phrase of unspecified length on the command line. For example: prompt% letter print Operating Sys
Sedaia [141]

Answer:

Check the explanation

Explanation:

#define _MULTI_THREADED

#include <pthread.h>

#include <stdio.h>

#include <errno.h>

#define           THREADS          2

int               i=1,j,k,l;

int argcG;

char *argvG[1000];

void *threadfunc(void *parm)

{

int *num;

num=(int*)parm;

while(1)

   {

   if(i>=argcG)

   break;

   if(*num ==1)

   if(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u')

   {

   printf("%s\n",argvG[i]);

   i++;

   continue;

   }

    if(*num ==2)

   if(!(argvG[i][0]=='a' ||argvG[i][0]=='2'||argvG[i][0]=='i' ||argvG[i][0]=='o' ||argvG[i][0]=='u'))

   {

   printf("%s\n",argvG[i]);

   i++;

   continue;

   }

   sched_yield();

   }

return NULL;

}

int main(int argc, char *argv[])

{

pthread_t            threadid[THREADS];

int                  rc=0;

int                  loop=0;

int arr[2]={1,2};

argcG=argc;

for(rc=0;rc<argc;rc++)

argvG[rc]=argv[rc];

printf("Creating %d threads\n", THREADS);

for (loop=0; loop<THREADS; ++loop) {

     rc =pthread_create(&threadid[loop], NULL, threadfunc,&arr[loop]);

}

for (loop=0; loop<THREADS; ++loop) {

   rc = pthread_join(threadid[loop], NULL);

}

printf("Main completed\n");

return 0;

}

The below attached image is a sample output

3 0
3 years ago
What is a program that, when installed on a computer, records every keystroke and mouse click?
Mrac [35]
"Key logger" This could be software or hardware that does this.
6 0
3 years ago
Other questions:
  • Write the definition of a method named printPowerOfTwoStars that receives a non-negative integer n and prints a string consistin
    10·1 answer
  • Write a function called activity which takes an integer parameter X that does the following:
    6·1 answer
  • What are the ASE special certifications?
    14·2 answers
  • -Define three types of user mode to kernel mode transfers?
    11·1 answer
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
  • What does IDLE stand for
    11·2 answers
  • Freeeee BRAINLIESTHBJHBJHB
    8·2 answers
  • What actions can you take to ensure the physical security of network devices?
    14·2 answers
  • Login
    11·1 answer
  • Which feature helps an edit-test-bug cycle work faster in the python programming language?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!