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
Alchen [17]
3 years ago
8

The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is st

ored in the variable price. Which piece of code will correctly decide the price for each ticket.
Computers and Technology
1 answer:
Hoochie [10]3 years ago
4 0

Answer:

If a museum charges different prices based on the day of the week and age of the visitor. The pricing rules are shown below.

- On Tuesday and Thursday children 10 and under get in free ($ 0).

- For all other days and ages the cost is ten dollars ($ 10).

The code in python is;

if (day == 'Tuesday' or day == 'Thursday') and age <= 10:

   price = 0

else:

   price = 10

Explanation:

The logic of the algorithm suggests that that the conditional if-statement assigns zero to the price variable if the day variable is either Tuesday or Thursday and the child's age is 10 or below but assigns 10 to the price variable if the condition is not met.

You might be interested in
Which of the following is true of how packets are sent through the Internet?
astra-53 [7]

Answer:

It is A: Packet metadata is used to route and reassemble information travelling  through the internet.

Explanation:

Step 1: The Internet works by chopping data into chunks called packets. Each packet then moves through the network in a series of hops. Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee

Step 2: Entering the network

Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee.

Step 3: Taking flight

The next hop delivers the packet to a long-haul provider, one of the airlines of cyberspace that quickly carrying data across the world.

Step 4: BGP

These providers use the Border Gateway Protocol to find a route across the many individual networks that together form the Internet.

Step 5: Finding a route

This journey often takes several more hops, which are plotted out one by one as the data packet moves across the Internet.

Step 6: Bad information

For the system to work properly, the BGP information shared among routers cannot contain lies or errors that might cause a packet to go off track – or get lost altogether.

Last step: Arrival

The final hop takes a packet to the recipient, which reassembles all of the packets into a coherent message. A separate message goes back through the network confirming successful delivery.

8 0
3 years ago
Read 2 more answers
When creating any digital work, what is the MOST important thing to remember?
kvasek [131]

Answer:

ALWAYS  double check your work

Explanation:

3 0
3 years ago
In a relational database design, all relationships are expressed by ________.
velikii [3]
Explain what is meant by a limited data set and how this HIPAA rule may affect medical assistants
8 0
3 years ago
कम्प्यूटर में एक समस्या को ठीक करने के लिए एक कार्यक्रम या कोनफीगरेशन परिवर्तन के बाद किए जाते हैं
VARVARA [1.3K]

restart.is done after the computer is passed through configuration

3 0
3 years ago
Life can get busy and hectic but relationships matter what is an effective way to mending relationships that may have been negle
Galina-37 [17]
Staying and working thing out or getting help
8 0
2 years ago
Other questions:
  • It can be useful to have a mentor because they will help you
    7·2 answers
  • When introducing new devices to the network, the organization's security policy requires that devices be monitored to establish
    15·1 answer
  • Describe how antipoverty programs can discourage the poor from working. How might you reduce this disincentive? What are the dis
    11·1 answer
  • A program that interacts with another piece of software as it if were a human user is known as a(n) ________.
    5·1 answer
  • Suppose that Alice wants to send Bob a 50 kilobyte message over a 1 Gbps link. The total time required to transmit the message (
    5·1 answer
  • If you are involved in a collision that results in property damage, injury, or death, you must call
    13·1 answer
  • .Choose the extention of Scratch Project<br><br><br> .sb2<br><br> jpeg<br><br> .exls
    5·2 answers
  • A client calls to complain that his computer starts up, but crashes when Windows starts to load. After a brief set of questions,
    13·1 answer
  • Which item is essential to know before sketching a navigation menu flowchart?
    7·2 answers
  • 1. What are the two main functions of an operating system?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!