Toll roads have different fees at different times of the day and on weekends. Write a function CalcToll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). The function returns the correct toll fee (double), based on the chart below. Weekday Tolls • Before 7:00 am ($1.15) • 7:00 am to 9:59 am ($2.95) • 10:00 am to 2:59 pm ($1.90) • 3:00 pm to 7:59 pm ($3.95) • Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: CalcToll(8, true, false) returns 2.95 CalcToll(1, false, false) returns 1.90 CalcToll(3, false, true) returns 2.15 CalcToll(5, true, true) returns 1.05
Q: What is the main distinction between the Internet and the phone system?
A: Introduction: The Internet is a global network of networks that is interconnected.
Q: Identify and briefly define the five primary task management techniques used in operating systems.
A: Intro The five basic approaches to the task management employed in the operating systems:…
Q: How are the Adhoc Network nodes notified when the network's topology has changed?
A: Start: Understanding how the nodes in an Madhok Network are aware of changes in network topology.…
Q: WorkArea Results Given an int variable k that has already been declared, write some code that uses a…
A: As I am writing the code in my local system, so I have first of all declared a variable k. Next, I…
Q: CH5: Looping > 11133 x WorkArea Results O Instructions Write a loop that reads positive integers…
A: The problem is based on the basics of loops in C++ programming language.
Q: In data modeling, what is the purpose of a business rule?
A: Business rule A business rule is a statement that is precise and in brief used to impose constraints…
Q: The following question supports the attainment of Course Intended Learning Outcomes (CILO): Identify…
A: I have provided C++ CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT----------
Q: What does FACTS mean in the context of power systems? Discuss FACTS devices of the IPFC type.
A: Facts stand for flexible alternating current transmission system. It allows to transmit alternating…
Q: Non-technical cybersecurity attacks should be defined and explained.
A: Introduction: Non-technical attacks do not necessitate a technical understanding of system entry…
Q: Is it possible to speed up the process of reprogramming views?
A: View controllers play an important role in the process of preserving and restoring state. Preserving…
Q: Why would it be beneficial to reduce the number of support structures for students, administrators,…
A: INTRODUCTION: Here we need to tell Why would it be beneficial to reduce the number of support…
Q: When it comes to a multilayer queueing system, what is the benefit of having varied time-quantum…
A: Multi-Level Queueing: A queue with a predetermined number of levels is known as multi-level…
Q: What are some of the many cybercrime theories? If you have any further information, please provide…
A: cybercrime theories: After all, these theories are meant to explain crimes committed in the "real…
Q: Item Number (Item Name) In this case, the date of supply is 04 VENDOR Vendor supply chain Authors'…
A: Attribute (Simple): Simple qualities are ones that cannot be further subdivided. For example, in the…
Q: filed a
A: Through Social media, we can utilize sites and other internet based stages to share data, make…
Q: What methodologies are used in software design and development
A: Agile development methodology. ... DevOps deployment methodology. ... Waterfall development method.…
Q: Determine the kind of cable that will connect the switch and router. Which gadget is used to join…
A: Basics: A cable is a plastic-coated wire that transmits force or information between devices or…
Q: A project is broken into the tasks shown in the following table along with the dependencies,…
A: A project is broken into the tasks shown in the following table along with the dependencies,…
Q: How can you deal with different kinds of data to easily choose correct tools and algorithms in…
A: Data mining is not specific to one type of media or data and should be applicable to any kind of…
Q: Make a list of the seven criteria used in computer science to choose the best file organizing…
A: System for filing documents: 1) The file organisation is the method for representing and storing the…
Q: Give a brief explanation of the two basic functions of an operating system.
A: Introduction: An operating system (OS) handles all of the computer's other application programs once…
Q: Describe how Identifying Relationships, Non-Identifying Relationships, and Non-Specific…
A: Finding connections: Identifying relationships are ones in which a kid may be linked to a parent.…
Q: I. Compute for the running time for each algorithm/code and give its complexity 1. for i = 1 to n do…
A:
Q: Contrast and contrast iterative and recursive solutions. When do you prefer iteration over…
A: Recursion Iteration The function invokes itself. A series of instructions that is continually…
Q: What is the name for an algorithm that is faster but takes up more space?
A: The efficiency of an algorithm is determined by the amount of time and space required to execute a…
Q: Discuss the circumstance in which there is no room for new processes in memory and what actions the…
A: Intro Actually, OS is a system software that manages computer hardware and software.
Q: Is there a safe way to use a printer and other PCs in an office that has shared resources?
A: Introduction:- NOTE:- Below I explain the answer in my own words which you understand well.…
Q: What is the role of software engineering in software development?
A: Software development is a lengthy and typical process and should be done with all procedures…
Q: What are a Cyber Security instructor's responsibilities/duties?
A: What You Should Do: To understand the duties of a Cyber Security Instructor, consider the following…
Q: MAKING A DATABASE MANAGEMENT SYSTEM USING MICROSOFT ACCESS Can you give some examples of DATABASE…
A: Find the required answer given as below :
Q: What are the advantages and disadvantages of using a relational database management system?
A: Introduction: An examination of the benefits and drawbacks of a relational database management…
Q: In today's enterprises, what is the most prevalent architecture for constructing a firewall?…
A: Introduction: A real DMZ is the most secure firewall architecture. To create a genuine DMZ, you'll…
Q: How are TCP and UDP different?
A: Protocols TCP and UDP: TCP (Transmission Control Protocol) is a transport-layer protocol that…
Q: Detail the relationship between user-centered design concepts and the software development…
A: Introduction: Software life cycle models provide visual and diagrammatic representations of the…
Q: Is a mistake in a database system more serious than an error in another area?
A: Minor database errors may be advantageous to an attacker since they indicate what information they…
Q: Describe the significance of team-building exercises. Five (5) articles should be used to back up…
A: Introduction: We can swiftly solve a problem if we have a group of people with similar goals who…
Q: For a number of reasons, edge triggers should be used in shift registers.
A: Introduction: Shift registers are used to store temporary data. Additionally, shift registers are…
Q: Information technology Describe what the most significant distinction is between Internet access and…
A: Introduction Communication is most important when users are located at remote location. In this…
Q: When it comes to popularity, Cloud Computing and the so-called Big Data Cluster are swiftly grabbing…
A: Big data advantages in the cloud: the following are the benefits or advantages of big data in the…
Q: Throughout the semester, we defined techniques and the SDLC. The SDLC and software engineering…
A: SDLC: SDLC is the practise of breaking down software development work into different stages in order…
Q: What three data abnormalities are caused by data redundancy? How to get rid of these anomalies
A: Introduction: Anomalies in data are discrepancies in data that occur due to a database action such…
Q: Successful virtual worlds use a variety of different technology.
A: Introduction: As a user, you join a computer-simulated environment that provides you with perceptual…
Q: "In formation technology is a benefit," compose a brief paragraph.
A: Write a short paragraph on " Information technology is a BENEFIT." The world has changed due to…
Q: What are the current regulatory rules in place for securing personal information and reacting to…
A: Introduction: Security breach notification laws or information breach notification laws require…
Q: Explain the importance of operating systems and whether or not connecting with a computer without…
A: Intro The significance of operating systems and whether or not communicating with a computer…
Q: ed the instructions below, but I have no idea what this question is asking. I don't know what…
A: Here is the completed code for this problem. Comments are included, go through it, learn how things…
Q: What is the router's boot procedure?
A: Below is the answer to above question. I hope this will be helpful for you...
Q: How is data transferred from a device that only permits sequential access to one that only allows…
A: Introduction: The sequential access method of accessing data from a storage medium is a technique.…
Q: A relational database can't have relationships like this, as shown by the examples given?
A: Relational Database: A relational database is a form of database that stores and makes data…
Q: 1- Retrieve the name and address of passengers
A: Here we need to provide a SQL Query. Here both the attribute Name and address belongs to table…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images
- Toll roads have different fees at different times of the day and on weekends. Write a function CalcToll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). The function returns the correct toll fee (double), based on the chart below. Weekday Tolls Before 7:00 am ($1.15) • 7:00 am to 9:59 am ($2.95) • 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) • Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) • 7:00 am to 7:59 pm ($2.15) • Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: CalcToll(8, true, false) returns 2.95 CalcToll(1, false, false) returns 1.90 CalcToll(3, false, true) returns 2.15 CalcToll(5, true, true) returns 1.05 Your program should include the function main( ), which asks for and validates the proper user inputs to be passed to the CalcToll( ) function. The function main() also displays the toll fees…Toll roads have different fees at different times of the day and on weekends. Write a function CalcToll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). The function returns the correct toll fee (double), based on the chart below. Weekday Tolls Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: CalcToll(8, true, false) returns 2.95CalcToll(1, false, false) returns 1.90CalcToll(3, false, true) returns 2.15CalcToll(5, true, true) returns 1.05 need help with code in c++There is only 1 ques with 2 part. Please answer the questions ( Answer in python ) Part I: Cities. Write a function called describe_city which accepts the name of a city and its country. The function should print a simple sentence as shown in the output example. Give the parameter for the country a default value. Make 5 calls to the function using the following arguments: Reykjavik, Iceland Pittsburg Ontario, Canada Cairo, Egypt Miami, USA Output Example : ( FOLLOW THE OUTPUT SAME AS GIVEN BELOW ) Reykjavik is in Iceland Pittsburg is in USA Ontario is in Canada Cairo is in Egypt Miami is in USA Part II: Blastoff!!! Write a function called count_down which has 1 integer parameter. The function should countdown from that parameter value to 1. Each step in the countdown should be printed on the same line followed by ‘Blastoff!!!’ also on the same line. All of this should happen in the function. Make 3 calls to the function with the following arguments: 3 5 10 Output…
- Write a function that asks the user for their birthday month and day and then the function should call a nested function to find out the person’s zodiac sign. Test your program with some user input. Aries: March 21 - April 19 Taurus: April 20 – May 20 Gemini: May 21- June 21 Cancer: June 22- July 22 Leo: July 23 – August 22 Virgo: August 23 – September 22 Libra: September 23 – October 23 Scorpio: October 24 – November 21 Sagittarius: November 22 – December 21 Capricorn: December 22 – January 19 Aquarius: January 20 – February 18 Pisces: February 19 – March 20Complete the function quarts_to_liters() that has one parameter as a volume in quarts. The function returns the volume converted to liters, given that 1 quart = 0.946353 liters. Ex: If the input is 69, then the output is: The number of liters is 65.298good stat ofl them ii days. You need to upload your solutions in a single python file (assl.py) to the link on MS Teams. Part 1 Add this comment: # Ass 1: Part 1 Write a program that declares a function called draw Star which receives an integer value as a parameter, and draws a number of stars equal to the received integer. Samplel: Please enter the number of stars: 5 The shape is: **** Sample2: Please enter the number of stars: 3 The shape 15 *** Part 2 Add this comment: Ass 1: Part 2 Write a program that summation of even ni "nd M then prints the 3.9 nclud d if were even of 3
- C++ Toll roads have different fees at different times of the day and on weekends. Write a function CalcToll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). The function returns the correct toll fee (double), based on the chart below. Weekday Tolls Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: CalcToll(8, true, false) returns 2.95CalcToll(1, false, false) returns 1.90CalcToll(3, false, true) returns 2.15CalcToll(5, true, true) returns 1.05 Your program should include the function main( ), which asks for and validates the proper user inputs to be passed to the CalcToll( ) function. The function main() also displays the toll fees based…Create a function that takes a variable number of arguments, each argument representing the number of items in a group. The function should return the number of permutations (combinations) of choices you would have if you selected one item from each group. Examples combinations (2, 3) 6 → combinations (3, 7, 4) → 84 combinations (2, 3, 4, 5) → 120Because of the outbreak of the Coronavirus (COVID-19), visitors from infested countries and regions have to be quarantined for 14 days which is 14 X 24 X 60 = 20160 minutes! Write a function Min2DHM(minutes) that takes the number of minutes as a parameter and converts that number of minutes into a specific format below: Day(s): Hour(s): Minutes(s) Note: You can assume the number of minutes is between 0 and 20160 and here is the expected output of your function.
- Code should be in Python, please Toll roads have different fees based on the time of day and on weekends. 1. Write a function calc_toll() that has three parameters: the current hour of time (int), whether the time is morning (boolean), and whether the day is a weekend (boolean). The function returns the correct toll fee (float), based on the chart below. Weekday Tolls Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: calc_toll(8, True, False) returns 2.95calc_toll(1, False, False) returns 1.90calc_toll(3, False, True) returns 2.15calc_toll(5, True, True) returns 1.05The food pantry provides its volunteers with keys to unlock doors and a Food Pantry vest to let customers know they work there. There are a limited amount of keys and vests, so volunteers need to check them out of the office.Complete the program by creating a CheckoutEquipment function that takes in the number of keys and vests currently available at the office. If there are enough keys and vests, the function should reduce the number of keys and vests by 1 and return true. Otherwise, the number of keys and vests will stay the same, and the function will return false. Take note that the number of keys and vests will be defined in the main function and the CheckoutEquipment function should modify the values of those variables declared in main. #include <iostream> int main() { int keys = 10; int vests = 10; bool checked_out = CheckoutEquipment(keys, vests); if (checked_out) { std::cout << "Successfully checked out.\n"; } else { std::cout << "Not…You are tasked with writing a small part of a museum's ticketing system. The museum calculates ticket prices using the following rules: $20.00 per admission. Children under 15 get a 50% discount. Seniors (60 years and older) get a 25% discount. Write a Python function that takes a list of customers' ages and returns the total cost for the group. Your function must match the docstring below. You do not need to include the docstring in your solution. '''Function -- get_ticket_costCalculates the cost of museum admission for a group.Parameter:group_ages -- A list of integers representing customer ages.Returns:The total cost for the group, a float. The return value is not rounded.''' Example get_ticket_cost([10, 39, 40]) returns 50.0