Count Dracula buys blood from tha public (AIDS tested, of course). But since he prefers certain types to others, he pays as follows: Type A 3000 Type B 1800.75 Type C (FOR AB) 2880.25 Type 0 1500 Write a program to input clients name, his/her blood type,and the volume (liters) of blood extracted. Loop exits wheninputted blood type is invalid. Output how much each customer will be paid.
Q: In the context of a hash function, what is a compression function?
A:
Q: 1. Create a selection sort program and upload your file here. 2. Screenshot your sorted output after…
A: The C code is given below with code and output screenshot Happy to help you ?
Q: olve C and D
A: Solution- The solution of above question is given as-
Q: write an algorithm on circular linked list by using singly/doubly linked list
A: Solution: Circular Doubly Linked List: It has properties of both doubly linked list as well as…
Q: A B D G H 1 Based on a survey, In 2017, the IT Strategy team decided to develop a mobile application…
A: According to the information given:- We have to follow the instructions in order to get value in…
Q: Use a range-based for loop in C++ to loop through a given vector of integers and determine how many…
A: Please find the answer below :
Q: d) Using SUMPRODUCT Function, write a formula in cell range D64 to compute the weighted score of…
A: “Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: A logic gate circuit with four inputs A, B, C, and D with out shown as indicated in Figure 1. Ao во…
A: Answer: We need to do the equivalent the output of the given circuit as the given expression. so we…
Q: A signal with 60 milliwatts power passes through a device with an average noise of 6 microwatts.…
A: Solution: Given, Signal =60 milliWatts = 0.06 WatssTotal Noise = 6 Mircowatts = 6 *10−6…
Q: rging problems for IPv4 and
A: The answer is
Q: PLEASE USE C PROGRAMMING LANGUAGE ONLY AND NEED FOR USER INPUT.
A: C Program: #include<stdio.h> // function for quick sort void quick_Sort(int n[20],int s,int…
Q: 32 bit number like that.
A: The answer is
Q: Give me information about the structure of the Data Encryption Standard cipher system and explain…
A: The National Institute of Standards and Technology has released the Data Encryption Standard (DES),…
Q: iN PYTHON PLEASE 1. Write a line of code to get an int from the user and assign it to variable x.…
A: Python introduction:- Python can simulate real-world entities since it is a general-purpose…
Q: What is exceptions and how is occur in the real world? That represented in our everyday lives. Try…
A: Introduction: To prepare an object's state for subsequent processing, a technique known as…
Q: 2. Analyze the following sequential circuit by determining the truth table. (Complete Output and…
A: flip flop:- A flip-flop is a type of electronic circuit that has two stable states and can be used…
Q: What is a nonce?
A: Introduction In this question, we are asked about the nonce
Q: C# program in Visual Studio Code. The main application class must meet the following requirements…
A: C# Introduction:- The pronunciation of C# is "C-Sharp." It is a Microsoft-provided object-oriented…
Q: What properties must a hash function have to be useful for message authentication?
A: Message Authentication:- Data integrity, or the ability of the receiving party to confirm the source…
Q: 2. Create a contacts module to meet the following requirements: i. Create a file named contacts.py.…
A: The complete answer in python is below:
Q: Write a counting program in MIPS assembly. The program should print the first sixteen powers of 2…
A: Solution: Given, Write a counting program in MIPS assembly. The program should print the first…
Q: what is market booket analysis?
A: MARKET BASKET ANALYSIS Market basket analysis could be a data processing technique utilized by…
Q: If you are in a city and have to walk from where you are, having planar coordinates (0,0), to a…
A: Given 2 inputs coordinates x and y and we have to return Euclidean distance and taxicab distance.…
Q: What is the purpose of an interface? A. To define a set of variables. B. To make it so we don't…
A: In this question we need to choose the correct purpose of interface in Java from the given choices.
Q: need help in this MCQ based on the UML attached below. Assuming there is some relationship between…
A: The answer is given below.
Q: Another approach to deskewing is to consider the bit stream as a sequence of non-overlapping groups…
A: These question answer is as follows
Q: Logistic regression aims to train the parameters from the training set D = {(x(i),y(i)), i 1, 2,...,…
A: Given that, D=x⇀i,y⇀i;i=1,2,3,...,my∈0,1hθ⇀x⇀=gθ⇀Tx⇀g(z) is the logistic function of…
Q: 2. Create a contacts module to meet the following requirements: i. Create a file named contacts.py.…
A: The complete answer in python is below:
Q: What is a nonce?
A: Nonce: It is a random or semi-random number which is generated for a specific use. The term nonce…
Q: IN pythobN 3) Given that x contains a number: Write a line of code to print x, formatted as…
A: As per the given question, the requirements while displaying x are: Field width is 8 Right-aligned…
Q: Q1. Using examples, differentiate between series and parallel Reliability Block Diagrams (RBD) and…
A: According to bartleby guidelines we are supposed to answer only 1 question, The Q1 question has been…
Q: Differentiate between k-means and k-median clustering algorithm.
A:
Q: Hint: ▪ The group will be a single character (uppercase or lowercase) Your output should be of type…
A: Answer: We have done code in MATLAB with the output
Q: Complete the Car class below so that it inherits from the given Vehicle class. Cars lose value over…
A: The complete car class is below:
Q: List three approaches to message authentication.
A: Dear Student, The three approaches to message authentication are MAC, HMAC and PMAC which are…
Q: I need help in this MCQ question based on the UML attached below Assuming there is some…
A: Given diagram contains four objects that are Car, Driver, Engine and TransmissionSystem. Each object…
Q: The login.html image is shown below. The simple PHP module shows email and password fields for a…
A: Cross-site scripting (XSS) is a type of computer security vulnerability that enables attackers to…
Q: When should Merge Sort be used as opposed to Quick Sort in an algorithm?
A: Merge Sort be used as opposed to Quick Sort in an algorithm? Although merge sort and…
Q: Write SQL commands to create a database and add data to them. There will be two tables: Courses…
A: The question is answered in step2
Q: Declare a vector of integers in C++ named vec and initialize the vector to 10, 20, 30, 40, and 50.…
A: 1) Below is C++ program that create a named vec, modify first element of the vector to be 100 and…
Q: Let A = |2153|. If A-1 = |abcd|, then a + b + c + d =
A: The question is answered in step2
Q: = 10^6 μs 1m = 60 x 1s log n Vn nlogn n² 2. For each function f(n) and time t in the following…
A: FUNCTIONS:- Functions are mathematical relationships between inputs and outputs. In other words, a…
Q: what is the supervised. learning and unsupervised learning.
A:
Q: What factors help determine if a website author is credible? O O how high they rank in Google their…
A: Introduction A scholarly (or academic) article's author will typically list his or her credentials…
Q: - For the given IP address 196.62.146.174/25, answer the following questions: Subnet Mask Number of…
A: Answer is attached in step 2 along with an explanation.
Q: Given integer inputs seed, how_many, and max_num, generate a list of how_many unique random integers…
A: Code Sample Output
Q: Show how quicksort can be made to run in O(nlogn) time in the worst case. Assume the input array is…
A: QuickSort Sorting is the systematic arrangement of objects. The popular sorting algorithm known as…
Q: What is good Stack planning?
A: Stack planning is a macro way for the space utilization. That means no space is wasted while doing…
Q: Explain Type I error and give an example. Explain Type II error and give an example. What is the…
A: Type I error : If a researcher rejects a null hypothesis that is actually true in the population,…
Q: Consider a very simple symmetric block encryption algorithm in which 32-bits blocks of plaintext are…
A: Here we have given solution for the given question. You can find the solution in step 2.
Count Dracula buys blood from tha public (AIDS tested, of course).
But since he prefers certain types to others, he pays as follows:
Type A 3000
Type B 1800.75
Type C (FOR AB) 2880.25
Type 0 1500
Write a program to input clients name, his/her blood type,and the
volume (liters) of blood extracted. Loop exits wheninputted blood
type is invalid. Output how much each customer will be paid.
Step by step
Solved in 5 steps with 3 images
- In python, a) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player’s choice of either High or Low is compared to a random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered “low”. A number between 8 and 13 inclusive is “high”. The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to b) Modify the application to allow the player to continue until there are 0 points left. At the end of the game, display the number of guesses the user took before running out of points.A supermarket is doing a sales promotion for soft drinks. If one day you buy soft drinks and bring the empty bottles the next day, they exchange each set of K empty bottles for a full one. A customer wants to make the most of this offer and therefore bought several bottles on the first day of the promotion. Now he wants to know how many bottles he will have at the end of the second day of the promotion if he use it to the fullest. Make a program to calculate this. Input The first input line contains integer T (1 ≤ T ≤ 10000), which indicates the number of test cases. In each of the following T lines come two integers N and K (1 ≤ K, N ≤ 10000), respectively the number of soft drinks bought and the number of empty bottles to gain a full. Output For each test case print the number of bottles that the customer will have on the second day, if he makes the most of the offer.Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.
- Implement using python progeam 1) The Variables used here are as followes B : True if there is a Baseball Game on TV, False if not G: True if George watches TV, False if not C: True if George is out of Cat Food, False if not F: True if George feeds his cat, False if not. Let us say you are given some Training Data which represents what happens over a period of time (For example: This file contains what happens every evening over one specific year). Your Task is to learn the conditonal probabilty tables for the bayesian network from the training data. The training data will be formatted as follows: The first number is 0 if there is no baseball game on TV (B is false), and 1 if there is a baseball game on TV (B is true). The second number is 0 if George does not watch TV (G is false), and 1 if George watches TV (G is true). The third number is 0 if George is not out of cat food (C is false), and 1 if George is out of cat food (C is true). The fourth number is 0 if George does not feed…Task 9 Write Python code of a program that reads an integer, and prints the integer if it is a multiple of NEITHER 2 NOR 5. For example, 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39 ... hint(1): use the modulus (%) operator for checking the divisibility hint(2): You can consider the number to be an integer !%3%===== Example01: Input: 3 Output: 3Write a program that computes a week salary for an hourly rate employee. Assume that the employee pays a regular hourly rate of P30.00. The overtime rate is P40.00. The first 40 hours are paid using the regular rate, and succeeding hours are paid using the overtime rate. If the total hours worked is more than 55 hours, a "hazard pay" worth P250.00 is added. (Filename: HoursWorked) The program will ask the user for the Total number of Hours (worked in a week) and display the equivalent salary. sample output: Enter number of Total Hours worked for the Week: 60 Salary for the week is : P2250.00
- Which of the following is true when comparing sentinel loops and user confirmation loops? Select one: a. Both types of loops may not iterate at all. b. A user confirmation loop can do no iterations, but a sentinel loop has to iterate at least once. c. A user confirmation loop iterates at least once, but a sentinel loop can do no iterations. d. Both types of loops must iterate at least once.3) Suppose an airline company has hired you to write a program for choosing the passengers who should leave an overbooked flight. That means the airline has booked too many passengers hoping some of them would not show up on time, but passengers are on board and the aircraft doesn't have enough seats available for all these passengers. Your program chooses the passenger who must leave the flight. Passengers will be ranked based on the fare they have paid for booking (a double number called fare), and their number of loyalty points (an integer number called points). Fare and points are equally important, that means, in order to decide the position of each passenger in the list, fare and points each have 50% importance. A Person with minimum priority (combination of fare and points) will leave the flight. You need to define a class called Passenger with these member variables: passenger's name • fare points. Passenger class must have 3 accessors, 3 mutators, a constructor with three…A parking garage charges a $20.00 minimum fee to park for up to three hours. The garage charges an additional $5.00 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24- hour period is $50.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and printsthe parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format: Car Hours Charge1 1.5 20.002 4.0…
- An electronic shop wants you to write a program to take orders from the clients and print the invoice. Your program asks for the item, the price per item and the quantity. The shop offers 2 types of delivery. If it is a fast delivery, we add 15$, otherwise we add 10$. Note that the user should enter 'f'or 'F' for fast delivery. Otherwise, the program consider that is a normal delivery (10$). Finally, we have a discount rule to be applied. If the total cost is greater than 100$, the client gets 5% discount Sample run1: Enter the item: TV Enter the price ($): 60 Enter the quantity: 2 Fast delivery (f/F)? f You have ordered 2 Ty with a *fast* Delivery: 15$ Total cost is 135.0$ You got a discount of 135*5%=6.754 After discount you should pay 128.25$ Sample run2: Enter the item: USB Enter the price in $: 10 Enter the quantity: 3 Fast delivery (f/F) ? n You have ordered 3 USB (s) with a delivery: 10$ Total cost is 40$Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: • The number of days spent in the hospital • The daily rate Hospital medication charges • Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an outpatient: • Charges for hospital services (lab tests, etc.) • Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file, PatientReport.txt. You can use the techniques you learned in Chapter…Implement programs involving the use of while, do..while and for loop statement. Objectives: Topics Covered: Implementing programs using loops. Description FRIDAY THE 13TH When will Friday the 13th occur in 1990? Write a program that will find all months in 1990 in which the 13th falls on a Friday. You need to know the following. 1. January 1, 1990 was on a Monday. 2. September, April, June, and November have thirty days, all the rest have 31 except for February which has 28 except in leap years when it has 29. 3. 1990 is not a leap year. Note: To make it fair for everyone, you may not use any built-in date functions from your computer language. Sample Output if Applicable Sample Run In 1990, Friday the 13th occurs in the months: APRIL