1) Do it in octave Write a function in Matlab to calculate the discount for a product where the conditions are given as follows: Discount = 0 if price ≤ 100 Discount = 10% if price ≤ 500 Discount = 20% if price > 500 This function should only work with 1 input and 1 output. So if it is called any other way, please return warning messages.
Q: In the following program, the main thread creates four peer threads and passes a pointer to the loop…
A: A thread which refers to the one it used to shares with its peer threads few information like code…
Q: Heron’s Method for Finding Square algorithm called “Heron’s Method” that finds the square root…
A: Heron's method is an iterative method for finding the square root of a number. It is based on the…
Q: Imagine there was only one communication protocol that solved every problem. If yes, then what steps…
A: One way of communicating using shared memory can be imagined as follows. Suppose that process1 and…
Q: Write a program in Java that opens a window (Frame). Write "hello world" on the frame.
A: Step-1 : Algorithm of the Program. STEP 1: START STEP 2: Create the frame STEP 3: Write the…
Q: List five uses for file systems that allow users or programs to execute typical tasks on files.
A: Typical file operations include: The following are some of the fundamental actions that users or…
Q: Will a data breach compromise cloud-based security measures? Is there anything that can be done to…
A: The answer is given in the below step
Q: what is the use of memory profiler in python?
A: The above question is solved in step 2 :-
Q: Create a circuit on TINKERCAD.com using Arduino and set an LED to about 2/3 brightness (compared to…
A: In this question we have to create a circuit on TINEKCARD using Arduino and set an LED to about 2/3…
Q: The fundamental way of controlling processes in Linux is by sending signals to them. There are…
A: The solution is an given below :
Q: Determine the different types of access control methods. Find out how they differ in the kinds of…
A: There are three primary categories of access control systems: Role-based access control (RBAC),…
Q: Will a data breach compromise cloud-based security measures? Is there anything that can be done to…
A: security breaches we've seen to date are the result of different cyber attack vectors, but the…
Q: Murphy Communications has been running a VLAN-managed network to connect different devices. You as a…
A: A Default VLAN is a type of VLAN that is automatically created and configured on a switch when it…
Q: How can those who promote quality assurance for apps available on Android and iOS help with the…
A: Simply put, cloud computing is the provision of computing services such as servers, storage,…
Q: Python code that shows how to transmit a message from process rank 0 to process rank 1, which…
A: Python code that shows how to transmit a message from process rank 0 to process rank 1, which…
Q: Explain how you'd use a mix of a personal firewall and a network firewall to keep your home network…
A: 1. The study of secure communication techniques that allow only the sender and intended recipient of…
Q: Write a MATLAB program for maximizing f(x) = x2 using genetic algorithm, where x ranges from 0 to…
A: a MATLAB program for maximizing f(x) = x2 using genetic algorithm, where x ranges from 0 to 31.…
Q: What specifically is meant by the phrase "multicore CPU," and how does one of them work? When…
A: Processor with several cores: A multicore processor (also known as a chip multiprocessor or CMP) is…
Q: Imagine a simple database storing information for students' grades. Design what this database might…
A: In a simplistic database, you could have at least these three objects: Students, Courses, and…
Q: Q4: Disk controllers map logical blocks to physical locations on the disk. Suppose that a 10MB file…
A: First, some basic properties: The time for one revolution is (1000 ms/sec × 60 sec/ minute) / 12000…
Q: C++ Describe a void type function called InvertDigits (k) that places the digits of a given…
A: The algorithm of the code. 1. Begin.2. Declare and initialize five integers k1, k2, k3, k4 and k5.3.…
Q: Where do you start looking, how much should you budget, and what are the three most crucial factors…
A: Hardware: The term "hardware" refers to the physical component or device of a system that is…
Q: write a program in java. it is basically a restuarant in which a person had to create an account. if…
A: Java which it is an object oriented programming language. Java is a high-level, class-based,…
Q: Can you explain the differences between digital signatures and other forms of authentication?
A: Digital signature: An authentication method enables the sender to encrypt communication and attach…
Q: C++ Programming. Three arbitrary numbers a, b and c are given. Is there a triangle whose side…
A: Program Approach:- 1. Include header file 2. Take the input from the user 3. Check the condition…
Q: Hello, I need help with a database question table 1 deciration_id type total_income table 2…
A: - We have to work on the SQL queries asked on the tables. - Since there are more than three…
Q: Why does the file system have a hierarchical organization
A: A file system is the way in which files are named and where they are placed logically for storage,…
Q: Average seek time: Average sectors/track: Surfaces: Sector size: 8ms 1024 8 1024 bytes
A: The answer is
Q: Operating systems take great care to ensure that each block of a file is written to a new, unwritten…
A: To be decided: Operating systems make an effort to make sure that successive disc blocks are used to…
Q: Let's wa(k through a review of basic SQL syntax, using as an example the database that was mentioned…
A: The tables for the following are given below: Courses: Teachers:Students: StudentCourses:
Q: Many individuals don't understand the seriousness of the implications that data breaches may have…
A: BACKGROUND: Cloud data breach When private or sensitive data is exposed to an unauthorised third…
Q: message. The command team selects p = 17 and q = 11. Assume e is cl
A: The answer is
Q: In what ways do the many parts of ICT work together to provide the many socially useful services…
A: Traditional data 'haves' and 'have-nots' discourse suggests that ICTs are limited to data access and…
Q: Implement the STAQUE abstract data type, a linked stack and linked queue together. Create methods…
A: Depending on whether the STAQUE is considered as a stack or queue, the method PUSHINS inserts one…
Q: An electronic store wants to keep an inventory of the product in its store. The user can enter as…
A: Algorithm:- 1. Initialize variables total_price and num_products to 0. 2. Initialize…
Q: In terms of frequency, which two types of encryption do people often use? What really differentiates…
A: Definition: Data may be encrypted so that only authorised users can decipher it. This process is…
Q: When a computer processor (CPU) boasts several cores, what exactly does it mean? What do the…
A: Having multiple cores means having multiple division of the processor , like dual core have two…
Q: Use matlab You are given two functions f(x)= x + 3 and g(x) = x² + 2. (a) Show how you can define…
A: Below i have provided matlab code.
Q: Suppose you have a RISC machine with a 2.7 GHz clock (i.e., the clock ticks 2.7 billion times per…
A: Please refer to the following step for the complete solution to the problem above.
Q: illustrates a recursive pseudocode description of the insert operation on a k-d tree. Here, x is the…
A: Inserting a node in a k-d tree progresses in a similar way as the node was inserted while building…
Q: How well-versed are you in the concept of "data leaking"? I don't understand what took occurred. I…
A: Data leakage:- Data leakage is the unlawful communication of information from an organization to an…
Q: destination address (222.186.114.16)
A: The answer is
Q: What are the three factors that influence a person's decision to buy hardware?
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: To get started, what is an IP address? Why do we need mnemonic addresses, exactly? How many domains…
A: Computers use IP addresses to communicate with each other both over the Internet and on other…
Q: List five uses for file systems that allow users or programs to execute typical tasks on files.
A: Typical file operations consist of: Among the fundamental file actions done by users or software are…
Q: Switches, routers, and cabling are "building blocks" of data transmission networks; thus, how should…
A: The answer is given in the below step
Q: Think about this: As a developer, you are putting the finishing touches on a hospital's patient…
A: Most of the time, software engineers do the following: Before making software to meet user needs,…
Q: What does it signify when a computer has an IP address? How are mnemonic addresses used? How many…
A: What does it signify when a computer has an IP address? How are mnemonic addresses used? How many…
Q: Learn the differences between linked allocation, contiguous allocation, and indexed file allocation.
A: answer is
Q: Just how may digital tools enhance learning? How has your exposure to ICT in the classroom…
A: 1) It makes classroom instruction more efficient. It's a great tool for spreading literacy. The…
Q: When someone mentions a "wireless rogue attack," what do they mean, and how can you determine if…
A: In this question we need to explain the meaning of wireless rogue attack. Moreover we also need to…
1) Do it in octave
Write a function in Matlab to calculate the discount for a product where the
conditions are given as follows:
- Discount = 0 if price ≤ 100
- Discount = 10% if price ≤ 500
- Discount = 20% if price > 500
This function should only work with 1 input and 1 output. So if it is called any other way, please return warning messages.
Step by step
Solved in 6 steps with 3 images
- (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.It is required to implement a MATLAB program By using "user define function" that used to: • Read (100) diagnosis data shown in the table below from the key board. • Display all Patient's data who have a "High Risk "condition only "High Risk" are patient who have an age greater than or equal to 75 If there are no high risk patients the program should terminated with an appropriate message Diagnosis Data Sample No. Patient ID Name Ag Height (cm) Weight(kg) e 1 905792 K.M. Liam 50 166 90 126987 A.H. Noah 60 170 105 100 913376 L.S.Benjami 80 160 85Going missing Some calculations involving blank values may give different results to what you might expect. For example, when you pass a blank value into the AND() function, it is treated as TRUE. This is often unhelpful. To make blanks behave in a sensible way in calculations, you must first convert them to be "not available" using NA(). This function takes no inputs, and returns a missing value. To convert a blank value to a missing value, use this pattern. =IF(ISBLANK(cell), NA(), cell) Instruction In column H, use AND() to find women who have kids and get benefits. In column I, convert the blanks in column G to missing values. In column J, again find women who have kids and get benefits, this time using column I rather than G. please show the formula used to "has kids and gets benefits" , "gets benefits with missing values", has kids and gets benefits". Thank you Is non-white Has over 12 years of school? Is married? Has kids? Has young kids? Is head of household? Gets…
- Q1: Please write a used-defined function in Matlab to monitor the balance of a bank account over years: Xi+1 = (1+ a) · x - b where the bank's annual interest rate a and the cash withdrawal amount b are defined as the global variables. Then write a main program to determine x1,X2, ,XN with x1=1000, a=0.05, b=200 until no money is left in the bank account after N years.In Matlab and octave, "rand" built in function gives a random number between 0 and 1. "Type rand and see that a number is returned between 0 and 1". Using the rand function write a script that. Write a script that generates random numbers between 0 and 10 using the rand function. The script must also tells the user if the produced random number is bigger than 5 or equal or less than 5. Such as: X>5 "The number is bigger than 5" XLISP Function help please A function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...". Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9. Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt. Extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day. Make the function return true (t) instead of the last thing it evaluates, to avoid seeing the message printed more than once.
- 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)In Matlab: Write a function that takes a month, day, and year as inputs and returns the number of days that have passed since January 1, 780, the year al-Khwarizmi, the "father of algebra", was born (include the 1/1/780 date as day 1). The function should include a subroutine to deal with all leap year calculations. The subroutine is a function that will take a year as an input and will return a 1 if that year is a leap year or a 0 if that year is not a leap year. As a check, the number of days between 1/1/780 and 6/21/2011 is 449,786. Shown below is your starter code with some pseudocode to get you started:Please answer it in Python Write a palindrome function that takes a word as an argument and returns a Boolean indicating whether the word is a palindrome. A palindrome is a word that remains the same when read from right to left instead of the usual order from left to right. Example: palindrome('here') is True but palindrome('go') is False. Write a function word_allows taking as an argument a word and a list of forbidden words, and returning True if the word is allowed, and False if the word is prohibited. Example: word_allows('fric', ['sous', 'fric', 'thune', 'ble']) is False word_allows('silver', ['sous', 'fric', 'thune', 'ble']) is true
- Answer the given question with a proper explanation and step-by-step solution. Can someone tell me if my pseudocode is correct. The pseudocode is supposed to get 5 grades from user, display the lettergrade for each grade entered and then display the average of all grades. The lettergrade for each grade is done by a function and so is the average. I am not sure if the determineGrade called in the main is correct.: Given a boolean expression consisting of the symbols 0 (false), 1 (true), & (AND), I (OR), and / (XOR), and a desired boolean result value result, create a function that counts the number of ways the expression may be parenthesized such that it evaluates to result. The expression should be completely parenthesized (for example, (0) A(1)) but not excessively (for example, (((0)) / (1))).EXAMPLE \scountEval("l/01011", false) yields 2 counts."0&0&0&1All0", true) = 10Code the function multiplier(). /***** *** //The multiplier function takes 2 integer // parameters n1 and n2 and displays the result // of n1 times n2 //*** *******