Write a function to describe the following scenario. Jonathan is selling his old trading cards. Each customer that buys gets the first box they purchase for $10, and each additional box for only $5.
Q: How to write a function (count) to perform the following task. Generate a counter (let's say…
A: 1. Import the `time` module.2. Define a function called `count(counter_value)` that takes a single…
Q: 5.11 LAB: User-Defined Functions: Max and min numbers Coral language only please Define a function…
A: Define a function named LargestNumber that takes three integer parameters num1, num2, and…
Q: Modify below program to read dictionary items from a file and write the inverted dictionary to…
A: To read the dictionary items from a file and write the inverted dictionary to another file, you can…
Q: You intercept the ciphertext ’ JVCPK’. Knowing that the ciphertext was obtained using a Shift…
A: Ciphertext refers to the encrypted form of a message or data that has been transformed using an…
Q: CORAL LANGUAGE PLEASE A pedometer treats walking 2,000 steps as walking 1 mile. Define a function…
A: 1) Below is program in coral language that define a function named StepsToMilesFunction…
Q: How were usability and user experience objectives broken down in the evaluation?
A: How were usability and user experience objectives broken down in the evaluation?
Q: Write a pseudocode and flowchart and add in a while loop and a do- while loop(can be any scenario…
A: This solution implements pseudocode, Java code, and a flowchart using while and do-while loops to…
Q: If you call a Java function that requires 3 parameters, but you only pass 2 values, what happens?
A: Java is a powerful and widely-used language known for its robustness and versatility. When writing…
Q: Founded in 1859 in Liverpool as a sugar refiner, today Tate & Lyle is a global provider of specialty…
A: What ethical issues/dilemmas are involved in using information systems in the above scenario?…
Q: What is the difference between using +/- versus = when setting file permissions? Is there any…
A: Your required solution is given in next step.
Q: Write a program (in main.cpp) that: Prompts the user for a filename containing node data. Outputs…
A: In this question we have to implement the createSpanningGraph method in minimalSpanTreeType.h to…
Q: Give me an example of f formatted string in python. Take all the data from the user.
A: Required:-Give me an example of f formatted string in python. Take all the data from the…
Q: In a Java class that follows the common object-oriented programming conventions for classes that…
A: In this question we have to understand about the recommended access modifier to use when defining…
Q: can you make me a logo for my website based on this name : Zaykedaar and this picture I made: my…
A: In this we have been asked to design a logo based out of indian restaurant Let's design a logo and…
Q: could you made a code with 3-Column Layout and HTML Table and Local Storage and Loop and Array…
A: In the realm of web development, HTML, CSS, and JavaScript are fundamental technologies that operate…
Q: What are the approaches to MDM in database ?
A: To be determined - what are the approaches to MDM in database
Q: Analyze and determine the outputs of the following program statements: #include #include int…
A: Please find the answer, source code and output for the same in the below steps.
Q: Solve problem by using PYTHON Program to remove the ith occurrence of the given word in list where…
A: To write python code to remove the ith occurrence of the given word in list where words can repeat.
Q: A processor's primary structural components should be mentioned and briefly characterised.
A: Introduction:A processor, often known as a processing unit, is a digital circuit that conducts…
Q: 6). The reduced instruction set computer reduces the operational time by shortening the clock cycle…
A: RISC or Reduced Instruction Set Computers are actually those computers that actually make the…
Q: Convert the following CFG into Greibach Normal Form: S -> ABC | AB | BC A -> 0A0A | 0A0 | 00 B ->…
A: As a result, users may encounter unsatisfactory user experiences with potential data breaches and…
Q: Assignment Instructions Divide x^(5)+15x^(4)+54x^(3)-25x^(2)-75x-34 by x+8.
A: To divide the polynomial x5+15x4+54x3−25x2−75x−34 by the binomial x + 8 using long division, let's…
Q: What tools or libraries are available to help with drawing in HTML5 Canvas? Are any open source?…
A: HTML5 Canvas drawing tools and libraries are available. Developers utilize many open-source…
Q: Write a program (in main.cpp) that: Prompts the user for a filename containing node data.…
A: The question is asking you to create a C++ program that accomplishes the following tasks:Prompt the…
Q: Encrypt the message TOMORROW SPY ON ENEMY CAMP using a tabular transposition cipher with encryption…
A: Transposition cipher is a cryptographic algorithm in which the order of alphabets in the plaintext…
Q: What kinds of circuits are needed for a counter? Select all that applies. Multiplexer State register…
A: A counter is a fundamental digital electronic circuit that counts the number of clock pulses and…
Q: a) Describe the steps of the genetic algorithm approach b) Explain what benefits a genetic…
A: A genetic algorithm (GA) is an evolutionary optimization technique that iteratively evolves a…
Q: I need help with coding C++ : Write the definition of a class swimmingPool, to implement the…
A: Include necessary header files: <iostream> for standard input/output and "swimmingPool.h" to…
Q: Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the…
A: Given:I need to know how to do this in python:Write a program that calculates an adult's fat-burning…
Q: Write a Python program with a function that will receive a list as an argument and write an function…
A: The program asks the user to input six numbers one at a time.The numbers are collected and stored in…
Q: Please provide me a C program that prints he message "C Programming." in the utput 10 times using…
A: Write a C program that prints the message "C Programming." in the output 10 times using the goto…
Q: 6- A client packet is received by a server. The packet has a destination port number of 21. What…
A: 6. When a client packet is received by a server, the destination port number in the packet header…
Q: C Programming Does the below code segment work? If not, why? fscanf(stdin, "%s",…
A: SOLUTION -This is a C statement using "fscanf".In C, when you use the %s format specifier with…
Q: Describe a Python program of ensemble methods by doing the following: If each base-learner is valid…
A: Multiple base-learners provide predictions as part of ensemble methods like majority voting, and the…
Q: Part 3 Implement a function to compute (RMSE) given an RDD of (label, prediction) tuples: Test this…
A: Root mean squared errorWe naturally would like to see how well this naive baseline performs. We will…
Q: What is needed to build a database in the physical world? Make a list of some of the most popular…
A: A database is a software that manages data in organized manner.A database is used when huge volume…
Q: What is the full form of CPU?
A: CPU Stands for Central Processing Unit, it is a principal part of any digital communication system.
Q: s age must be between the ages of 18 and 75 inclusive. If the age entered is not in this range,…
A: We define a custom exception AgeOutOfRangeError which will be raised when the age is not within the…
Q: construct a graph with vertices E,F,G,H,I whose degrees are 2,2,3,3,4 what is the edge set?
A: Construct a graph with vertices E,F,G,H,I whose degrees are 2,2,3,3,4
Q: Certificate.java public class Certificate { private String holder; private int level;…
A: Here i have created the certificates.java file below.
Q: 5.9 LAB: User-Defined Functions: Driving cost CORAL LANGUAGE PLEASE Define a function named…
A: We are tasked with creating a user-defined function called "DrivingCost" in this CORAL language…
Q: (i) Find the errors in the program and make necessary corrections. Do not insert any additional line…
A: the above ARM assembly program, which finds the most positive and negative values in a list of…
Q: how to make a Billing Automate Requisition System using springboot?
A: Billing is a critical part of any business, and it can be a time-consuming and manual process. A…
Q: Given the following Processing code, select what best describes the output. let x = 25; let y =…
A: The Processing code given in the question is a simple program that draws a rectangle on the screen.…
Q: remove the whitespaces from a string only for leading & trailing space the
A: your question is about removing space from leading and trail.let's see the correct code for this.
Q: the purpose of the "strict mode" in JavaScript, and how do you enable it in a JavaScript file?.
A: In JavaScript, "strict mode" is a feature that allows you to opt-in for a stricter set of rules and…
Q: Regardless of how user level threads are implemented, if a programme has two or more user level…
A: Introduction:Kernel: A kernel is the heart of a computer's software or operating system.Provide a…
Q: Question 1 Compute 1010-1110 for 4-bit two's complement numbers? O Overflow O-4 O +7 O +4
A: Two's complement is a mathematical representation used to represent signed integers in binary form.…
Q: Using both subsystems and logical partitions on a computer can be good for a lot of things.
A: Here is the Answer, Using both subsystems and logical partitions on a computer can be good for a lot…
Q: Describe the role of Azure Security Center in safeguarding Azure resources and workloads. Explain…
A: Azure security centerMicrosoft Azure Security Center is a collection of tools that help to monitor…
Write a function to describe the following scenario. Jonathan is selling his old trading cards. Each customer that buys gets the first box they purchase for $10, and each additional box for only $5.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
- Gamex, an online game website launches a game for kids where the kids have to pick up balls from a pool and drag them to the ribbon beneath the pool. The pool contains red, blue and green colored balls. Tester function of the game checks whether the kid have placed the picked balls according to the following constraints: The kid should have picked atleast one red, one blue and two green colored balls. The kid should place the balls in the following order. Red balls followed by green followed by blue balls. The number of red balls should be equal to blue balls. iv. i. ii. ii. The number of green balls should be twice as of red balls. Design pushdown automata to simulate the function of tester. Justify your answer.Last Name Dev Hours Review Date Rating Salary Bonus Brody 6 1/5/2018 2 $ 19,840 Alex 8 4/1/2018 5 $ 26,700 Ashley 1 7/1/2018 4 $ 33,200 1. Use the logical if function to pay a bonus. You determine the rules for the bonus. List the rules and your steps. For example, you may use the employee rating to align with a specific bonus percentage such as 2% for a 2 rating, 5% for a 5 rating, etc.When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)
- Functions for Organizing Your Code. You will create a new version of the program below . This new version will define the following functions. A function to read and validate the user option. A function to read and validate a yes/no input, if using the user-confirmation approach. A function that prints the menu A function that reads the order and returns the sub-total (which is the sum of the prices of the items ordered). A function that takes the sub-total as a parameter, and calculates and return the tax, the final total, and the tip. A function that takes the sub-tota, tax, total, and tip, and prints a receipt. Defiine function main() to drive the functionality of the program. Your program shall: Define and call the required functions Use meaningful names for the functions. Run and test the program to make sure it works correctly import sys menu = "Y"continueLoop ="y" #Enter number for each dish and price for users while continueLoop =="y":DishNumber= int(input("Enter…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) → 120Given the following comments and function declarations, write matching function definitions. void displayTotal(int price1, int price2, int price3); // Lists all three product prices on sequential lines, // as well as the total cost of them combined. void calcTotalPrice(double& price, int num); // Calculates and prints a total price for a transaction. // A transaction involves buying num products for price value, // including a tax rate of 0.00875%. // The price is stored in the price variable. int doubleAndMult(int& x, int &y); // Doubles the value of x and y, // then returns the value of the two added together.
- Please answer in C++ Code Admission to college is just beginning and Chef has also just finished his high school. There are NN colleges, listed from 11 to NN, and listed from 11 to NN. Each college has only one seat left. To apply for a college, each student must submit the same examination, the result of which determines their future, that is, the best student (the highest scorer) gets the first choice of college. Each student has a list of favourite colleges. They will want to get to the top ranked college on their list. If they can't get into it, they'll want to get into a second-ranked college in the middle of their list, and so on. If one vacant college seat is filled, that year's admission closes at that college. Then, people who have applied for that college should look for a lower college in their preferred list as long as it still has vacancies. Looking at the information about MM students, about their exam scores (given as standards) and the college IDs they apply for, find…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 YA floor plan is arranged as follows: • You may freely move between rooms 1 and 2. • You may freely move between rooms 3 and 4. • However, you can enter the hallway to move between rooms 2 and 4. 1 PMP 3 2 Омод. 4 Create a function that validates whether the route taken between rooms is possible. The hallway will be given as the letter "H". Examples possiblePath([1, 2, "H", 4, 3]) true possiblePath(["H", 1, 2]) false possiblePath([4, 3, 4, "H", 4, "H"]) true → H →
- Decryption Key A|B|C| D|E|F|G|H|I|J|K|L|M N|O|P|Q|R|S|T|U|V|W|X|Y|Z (letter above equals below, and vice versa) As you can see, A becomes N, B becomes O and so on. Your job is to write a program, with at least four functions, including main, which must do the following: 1. Ask user whether they want to encode or decode a message - if no, then terminate 2. Take the input string from the user, store it in dynamic memory (use new) 3. As appropriate, encode or decode the message using Rot13. 4. Output the encoded/decoded message 5. Delete the input string from dynamic memory (use delete)Imagine you run a website that presents users with different coding challenges in levels Easy, Medium, and Hard, where users get points for completing challenges. An Easychallenge is worth 10 points, a Medium challenge is worth 10 points, and a Hard challenge is worth 20 Create a function that takes in the number of each challenge level a user has played and calculates the user's total number of points. Keep in mind that a user cannot complete negative challenges, so the function should return the string "invalid" if any of the passed parameters are negative Example: score_calculator(1, 3, 5)→ 135 write in python pleaseComputer Science In python, how do I make a function that will initiate a round of a game, in a game where there's a total of three rounds total, and the first person to win 2 rounds win.