n years; permission is a Boolean that indicates wh ■G, PG-13, or R. The function returns the cost of ma der of decreasing precedence/priority: Nobody under the age of 10 may view an R-rated m You must be 17 years old or have parental permiss You must be at least 13 years old or have parental
Q: Examples mod (-13, 64) 51 mod (50, 25) 0 - mod (-6, 3) → 0
A: Algorithm - Create a function with two argument. Now use the below logic - if…
Q: Given the following expression, what is the equivalent in POS canonical form? Y = ~ABC +A~BC +A~B~C
A: given expression Y = ~ABC +A~BC +A~B~C
Q: Please answer the ques in python with showing the answer ( THERE is only 1 ques in 2 steps) Step 1:…
A: python introduction:- Python is a versatile scripting language that is widely used in many different…
Q: Write a C program that allows you to erase multiple spaces in a text file. Then re-write the…
A: C Programming language:- As a result of its ability to perform low-level programming, C is a system…
Q: Explain limitations keystroke-level model.
A: Key stroke level model predicts the how much time it take an expert user to complete a particular…
Q: 21. Suppose we have 2 bytes of virtual memory and 2° bytes of physical main memory. Suppose the page…
A: In this question, it is asked to calculate the Number of pages in virtual memory Number of page…
Q: Q.22 Write short note on user focus.
A:
Q: 2. 2. Suppose a computer using direct-mapped cache has 2³2 bytes of byte-addressable main memory and…
A: Given Data Main Memory Size = 232 Bytes Number of Cache Blocks = 1024 = 210 Block Size = 32 Bytes =…
Q: Apply Merge sort and Quick to sort the list, L, I, B, R, A, R, Y in alphabetical order.
A: Quicksort is a very efficient sorting technique that splits a large array of data into smaller…
Q: Create a function that takes a string and returns it back in camelCase. Examples camelCasing ("Hello…
A: Algorithm - Create a two function with two argument. Now use the below logic - return…
Q: 2. Set up a class named MyCipher. The class will have an integer variable named key. It also has the…
A: Here is the approach : Create the class called MyCipher. Create the var key. Use the constructor…
Q: What is Soft Systems Methodology (SSM) ?
A:
Q: List and describe each step involved in the Software Development Life Cycle.
A: Six processes are involved in the system development life cycle…
Q: You have a Tamagotchi toy (kids still know what these are these days, right?) and it requires a lot…
A: The python program is given below:
Q: Question 3 Three class definitions and a main function are given below: class A { public: }; class B…
A: I run the above code in complier. All option throwing errors : 1. 'c' was not declared in this scope…
Q: 3 Consider a desktop publishing system used to produce documents for various organizations. a. Give…
A: (a) If the type of publishing deals with the crucial data, such as the email addresses of all the…
Q: P-6.35 Implement a program that can input an expression in postfix notation (see Exer- cise C-6.19)…
A: 6.15 )solution def post_fix(expression): character = expression.split(" ") stack = []…
Q: The storage capacity of short-term memory is generally considered to be: 8-15 chunks of…
A: Short-term memory: The ability to store a tiny quantity of knowledge throughout the mind as well as…
Q: Please answer the ques with showing the code: (There is only 1 ques with 2 steps ) Q1: Step 1:…
A: NOTE: As per the company rules we are supposed to answer only first question please post your…
Q: Is there another way to format the return statment without using Math.abs? Thanks! public boolean…
A: Above code snipet explain In Below step.
Q: b) Design a memory-address map for the abov
A: The answer is
Q: Write a program that will calculate the area of a triangle and print the output. Hint area=.5* width…
A: C Program: #include<stdio.h> int main() { // declaring width, height and area as…
Q: Prove that a binary tree that is not full cannot correspond to an optimal prefix free code. Note: a…
A: We need to prove that a full binary tree that is not full cannot correspond to an optimal prefix…
Q: Based on the following Entity-Relationship Diagram with the following requirements: There are…
A: Solution 1 - An E-R diagram is created by given requirements as- ER-Diagram: The diagram up above…
Q: Explain Interacting Cognitive Subsystems (ICS) model.
A: ICS can be described as a systematic model which is comprehensive in nature of the company and each…
Q: For the ER below, All departments have students (every department has at least 1 student)?…
A: There are three types of relationships that can exist between two entities. One-to-One Relationship…
Q: Explain, in detail, why it is important to proactively maintain a clean code base.
A: It is more important to do coding cleanly more than just doing coding.
Q: I need help designing a class named Account that contains. A data field named id for the account…
A: /* package whatever; // don't place package name! */ import java.util.*;import java.lang.*;import…
Q: Describe how to implement the deque ADT using two stacks as the only instance variables. What are…
A: According to the information given;- We have to implement the deque ADT using two stacks as the only…
Q: Please follow instructions Using the IEEE standard for the 32 bit float register, place this decimal…
A: According to the information given:- We have to follow the instruction in order to use IEEE standard…
Q: Generate a PDA that accepts the following: Given an alphabet of a, b, c and null, only accept…
A: Process If the stack contains any A's or nothing, push an A for each a. Consider c's and b's as only…
Q: Question # 1 : Compute the complexity of the following implementations : a) for (int i = 0; i <= n;…
A: Answer : a) variable i go from 0 to n and variable j go from 1 to n-1 so total complexity of the…
Q: python: T1 = ( a, b, c) T2= a, b, c where a, b, c are numbers. Question 17 options:…
A: The above question that is python: T1 = ( a, b, c) T2= a, b, c where a, b, c are numbers. among…
Q: While useful, the modulo operator in JavaScript is not infallible when negative numbers are thrown…
A: Your JavaScript program is given below as you required with an output.
Q: Vrite a Description for an online xample Talabat) Show clearly entities and their att
A: Lets see the solution.
Q: In Java create the class TransformToDOWhileLoops ,type in the code given, and run your program to…
A: Given Java program contains two for loops and this program prints the sequence of odd numbers from 1…
Q: f(x)=-3x + 4
A: f(x)=-3x+4 is bijective or not
Q: Consider a desktop publishing system used to produce documents for various organizations. a. Give an…
A: “Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: Hello! I need some help with my Java homework. Please use Eclipse with JavaFX Please add comments…
A: Use of Java A handful of the most typical jobs that Java excels in are listed below:creation and…
Q: Generate a constrained Regular Expression for the language that is described by the following:…
A: Regular expression: A series of characters known as a regular expression describes a search pattern.…
Q: I am getting an error when entering the code at the very end. please fix it.
A: Note: As per the instruction in the question, the corrected code of the given code along with code…
Q: Write a prolog program that have 2 predicates: One converts centigrade temperatures to Fahrenheit,…
A: Below is the prolog program to convert centigrade to fahrenheit
Q: 1. 11. Convert the following expressions f (postfix) notation. 1. a) (8-6)/2 2. b) (2+3)x 8/10 3. c)…
A: Before proceeding further , we must know the basics. Below is attached introduction for operators…
Q: what is an example of BOTH correlated and uncorrelated subqueires? Please give simple example for…
A: We need to provide example of BOTH correlated and uncorrelated sub-queries in SQL. *As per the…
Q: t true? A PD
A: Solution - In the given question, we have to tell why is the given statement is true.
Q: Hdhdh
A: very nice....
Q: Hi, please help in Java. Thank you! Write a method named powersOfTwo that prints the first 10…
A: Note: Due to company policies I am compelled to solve only one question and that is the first…
Q: Please Answer this ques with showing the answer in python ( there is only 1 ques with 2 steps) Step…
A: First, we will create a list of "pets". Then we will print the statement. Then we will add an…
Q: There are 22 gloves in a drawer: 5 pairs of red gloves, 4 pairs of yellow, and 2 pairs of green. You…
A: There are a total of 22 gloves in the drawer: 5 pairs of red gloves, 4 pairs of yellow gloves, 2…
Q: Explain two distinct evaluation styles of usability with their advantages and disadvantages.
A: The question has been answered in step2
Step by step
Solved in 3 steps with 2 images
- Customers can buy computer screens in bulk from Computer Monitor Paradise, Inc. Customers receive discounts based on the number of monitors they buy. Complete the function bulk_purchase, which takes two arguments: monitors_to_buy, which is the number of computer monitors a customer wants to purchase; and monitor_cost, which is the non-discounted cost to buy a single monitor. The function computes and returns the total cost for the purchase according to the following rules: # of Monitors Cost in $ 1-99 100-199 200+ Examples: monitor_cost per monitor monitor_cost for each of the first 100 monitors and 20% discount on the rest 20% discount on the first 200 monitors and 35% discount on the rest Function Call Expected Output bulk_purchase(80, 75) $6000.00 bulk_purchase(175, 120) $19200.00 bulk_purchase (228, 180) $32076.00 [ ] 1 def bulk_purchase (monitors_to_buy, monitor_cost): 2 3 return 0 # DELETE THIS LINE and start coding here. # Remember: end all of your functions with a return…1 2 3 Tom 4 Tom 5 Tom Software House Weekly Sales Region Employee Product 6 Jenny 7 Jenny 8 Jeff 9 Jeff 10 Excel Word Access Excel Word Excel Word North North North North North East East Sales The correct function to sum all of Jeff sales. =SUMIFS(A3:A9,"Jeff",D3:D9) =SUMIF(A3:A9,"Jeff",D3:D9) =SUMIF(D3:D9,"Jeff",A3:A9) O-SUMIFS(D3:D9,"Jeff",A3:A9) $210 $230 $190 $150 $240 $140 $340Debugging The function course_average should calculate and return the average of the three values pass to it. The function main should ask the user to enter three grades and then pass these values to the course_average function. This function should also display a message to the user in the format below. For example, if the user entered 100, 90 and 95 the message would be:The average of 100 , 90 and 95 is 95
- Write a split_check function that returns the amount that each diner must pay to cover the cost of the meal. The function has four parameters: . bill: The amount of the bill. people: The number of diners to split the bill between. tax_percentage: The extra tax percentage to add to the bill. tip_percentage: The extra tip percentage to add to the bill. ● ● The tax or tip percentages are optional and may not be given when calling split_check. Use default parameter values of 0.15 (15%) for tip_percentage, and 0.09 (9%) for tax_percentage. Assume that the tip is calculated from the amount of the bill before tax. Sample output with inputs: 25 2 Cost per diner: $15.50 Sample output with inputs: 100 2 0.075 0.21 Cost per diner: $64.25 Learn how our autograder works 461710.3116374.qx3zqy7 1 # FIXME: Write the split_check function. HINT: Calculate the amount of tip and tax, 2 # add to the bill total, then divide by the number of diners. 3 4 Your solution goes here''' 5 6 bill float(input()) 7…Phython: Create a function so that when giving you a month it tells you the season of that month, for example: if it is January it will be winter.Using the def, try and except ValueError functions.ineering Computer Engineering Q&A Library Function: Create a function which accepts patient id and display the patients name, date admitted. Sample output is: The patient name is Maryam, she got admitted on 12-Feb-2020 Function: Create a function which accepts patient id and display the patients name, date admitted. Sample output is: The patient name is Maryam, she got admitted on 12-Feb-2020 Question Function: Create a function which accepts patient id and display the patients name, date admitted. Sample output is: The patient name is Maryam, she got admitted on 12-Feb-2020 Procedure Write a Procedure that accepts patient id and display the patient id, name, test name and result. Package Create a package which contains the above created procedure in the specification. Create package body of the above given procedure. And finally call the procedure created above by passing the patient id then display the output as shown below: Sample output: Patient id is: P0232…
- Lab Activity 8: Functions Objectives: The objective of this Lab Assignment is to use functions. As you have learned already, the best approach to solve a problem is to break it down into individual steps. Do not forget about what you have previously learned and seen. This assignment will be asking you to use the knowledge you have acquired since the beginning of the semester. PART 1: Percentage of amino acid residues. Write a function that takes two arguments-a protein sequence and an amino acid residue code - and returns the percentage of the protein that the amino acid makes up. Test your function on the following examples: Sequence MSRSLLLRFLLFLLLLPPLP MSRSLLLRFLLFLLLLPPLP maralllrfllfllllpplp MSRSLLLRFLLFLLLLPPLP Amino acid residue M R L YComplete the function blood_donor, which determines whether a person is able to donate blood. A person is eligible to donate blood if his/her age is 18 or over and his/her mass ("weight") is greater than 48 kilograms. The function takes four arguments: • age, which gives the prospective donor's age mass, which gives the prospective donor's mass in kilograms requested_blood_type, which gives the requested blood type • donor_blood_type, which gives the prospective donor's blood type The function returns one of several strings, depending on the inputs. If the donor's eligibility is satisfied and his/her blood type matches the requested blood type, return 'match' . Otherwise, check for ineligibility in the following order and return the first reason for ineligibility, if any: 'too young, too light' (both the age and the mass are too low) 'too young' (age is too low) 'too light' (mass is too low) 'mismatch' (requested_blood_type and donor_blood_type don't match) Examples: Function Call…Write the function truck_adjustment_factor(truck_proportion, terrain_type) that takes the proportion of trucks using the motorway and the terrain type as inputs and returns the adjustment factor that is used for calculating the highway capacity. The adjustment factor is calculated according to the following formula: adju stment factor = tprupurtime x(furtor-1) Where proportion is the proportion of trucks and the factor is the car equivalent factor for the given terrain. You should be calling your car_equivalent_factor function to get the factor - don't reinvent the wheel! For example, for rolling terrain and a truck proportion equal to 0.12: adjustment factor = 1/(1 + 0.12 x (4.0 - 1)) = 0.735 Notes: You should include (and call/use) your car_equivalent_factor function in your answer o In general, you should paste in your whole module so far in each question as later functions will call earlier functions. • You can assume the function will always be called with one of the three valid…
- A function named validGPA() to validate the GPA. A valid GPA value must be between 0 and 4 inclusive. The function must return the value of GPA and must take value of GPA as parameter.A function may return a struct: True FalseWrite a set of functions that calculate the cost of movie tickets for a family. These functions should use a pass-by-reference variable that accesses the double running_total variable in main(). Using a loop, keep displaying the ticket prices for each age group: Something like: Model Hall Movie Ticket Box Office Under Age 3 (free) Ages 3-11 ($10.25) Ages 12-54 ($15.50) Age 55 or older ($12) If 4 tickets are purchased (not counting under age 3) then 20% discount Within the loop: Keep asking the user to input the moviegoer age and to enter a zero for the age when they are finished inputting all the family members. Also, within the loop: Keep a running_total that is output to the screenafter each age has been entered. This running_total should be accessed through the functions using apass-by-reference variable. Finally, after the looping is done: Calculate the total cost, including a 7.5% sales tax, and output it to the screen.