The bird of paradise called the Helipixsal is renowned for its magnificent tail feathers which range in number from five to nine ornate feathers each of a different length. Their "magnificence" is quantified by the rather simple process of counting the exact number of tail feathers and multiplying this by the difference in the length of the minimum and maximum lengths of tail feather. You are to write a simple program that will allow the user to enter the length of each tail feather individually and keep on entering feathers until a -1 is entered. The program will then return the quantified "magnificence" factor.
Q: In the given sequence diagram, in which class should the makePayment() operation be defined? :…
A: Sequence diagrams are interaction diagrams that describe in detail how operations are performed.…
Q: Q2) Consider three-stage space-division switch with N=500, n= 50, k=5. 1. Draw the configuration…
A: answer is
Q: Distinguish between Internet access and a telephone network.
A: It is believed that the telephone network, which connects telephones to enable voice communications…
Q: Speed (0 - 120 Km/hr) - Membership functions (Min, Medium, Max) climate (0 - 60*C) - Membership…
A: The answer is written in step 2
Q: Convert the following grammar in GNF S→AA | 0 A →SS | 1
A: Greibach normal form is referred to as GNF. A context-free grammar (CFG) is in Greibach normal form…
Q: Solve the recurrence relation T (n) = T ( √n) + c. n > 4
A: Recurrence relation for the following code and solve it using Master’s theorem…
Q: ) How would you hardware-implement a four-input AND gate using two-input AND gates only? Draw its…
A: The logic gate is the device which acts as the building block for the digital circuit. Logic gates…
Q: Which of the following creates an array of integers with 5 elements? O a. int a(5); O b. float a[5];…
A: Option c. int a[5]; Is the correct answer it creates an array of integers with 5 elements
Q: As a software project manager in a company that specializes in the development of software for the…
A: The project manager for the software must visit at least one offshore industry where the company…
Q: Arrays are data structures consisting of related data items of the same type. Select one: O True O…
A: The correct option for the given question is represented in Step 2.
Q: PYTHON PROGRAMMING Submit a code snippet for a function (in the coding sense) that accepts as an…
A: PROGRAM INTRODUCTION: Take the number from the user as input. Use a loop to iterate the number from…
Q: for the below array, the fourth element is: char str1[] = "string"; a. n b. \0 c. i d. I
A: Let's write a code with the similar condition and find the 4th element in the given array. So,…
Q: Apex Assignment: Create a apex class called addition and then create a method to add the 2 integer…
A: Apex which refers to the object oriented programming languages that are allows the developers to…
Q: Write a Python program to solve the following problem: use built in function to calculate the square…
A: Program:import math#asking user to enter valuesx=float(input("Enter Value of x:…
Q: A large book box holds 80 lbs, a medium box hold 50 lbs. and a small holds 30 lbs. The average book…
A: A pseudo-code is an informal description of the algorithm, usually in English language. An algorithm…
Q: There are blank 3 digit counting numbers that are made using only the odd digits 1,3,5,7,9 ?
A: To form a 3 digit number using 1,3,5,7,9. We know that all the 3 digit places are must be one of the…
Q: Assume that our LastPass web server is configured to use port 7777 rather than the default HTTP…
A: The question has been answered in step2
Q: a) A language is a finite set of strings over some finite set of alphabets. A language L can be…
A: As per company guidelines, only 3 sub parts will be answered. So, please repost the remaining agian.…
Q: Which transport layer protocol is best suited for time-critical applications?
A: Transport Layer Protocol: The TCP-IP paradigm refers to the OSI Level 4 layer known as transport by…
Q: Which of the following is true about functions with a return value? OYou must use the return value…
A: A return value is a value that a function returns to the calling function when it completes its…
Q: How crucial is software development? Four more characteristics, in your opinion, should be…
A: Introduction: Software development's ability to create and provide value to its users cannot be…
Q: What is the basic service set setup of a wireless network? How are they put to use?
A: Encryption: As its name suggests, the Basic Service Set (BSS) is essentially a network design that…
Q: Using the module graphics.py to draw a triangle requires the use of which of the following classes?…
A: In this problem we need to select the correct option that is used create the triangle. Use the…
Q: int b[100]; The array b has indices in the ranges 0-99. Select one: O True O False
A: Let's understand step by step : Array : Array is used to store elements of similar type. It is…
Q: Define a function generate_new_string that takes an integer times and a string string and returns a…
A: Answer: I am using python language. Since no language is asked in the problem
Q: please make a suitable java program (inheritance) according to picture 3. House +numberRoom:int…
A: Here is The Solution. public class House{ public int numberRoom; public String type;…
Q: Give a concise definition of a computer and based on this definition infer why computers have become…
A: Answer:
Q: 6.24 LAB: Calculate average Complete the CalcAverage() function that has an integer vector parameter…
A: Here I have defined the function named CalcAverage(). In this function, I have extracted the size of…
Q: Suppose a router's drop policy is to drop the highest-cost packet whenever queues are full, where it…
A: One advantage of this policy is that it can help to avoid dropping packets that have already been in…
Q: write only the code required to multiply the number 8 to each array value in the array and print the…
A: As the programming language is not mentioned here, we are using JAVA The JAVA code is given below…
Q: Build an algorithm to construct Single-Source LONGEST Paths of a given graph. Single- Source LONGEST…
A: The distance between two vertices of a directed graph that is the longest is called longest path of…
Q: 11.What is the order of growth of the recurrence relation A(n)-8A(n/8)+n? * A(n) € 8(n**3) A(n) €…
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: not (a or b) == (not a) or not (b) Select one: O True O False
A: The above mentioned questions answer is given in the following steps for your reference
Q: Q2. time complexity of the following algorithm for n-1 to n ³²-1 do for ji+1 to n² do print j for K…
A: I have explained how to calculate the time complexity of above program. See below steps.
Q: ode in specific functions!.
A: Approach: Declare a string variable and read input the name and store it in the variable. Then…
Q: Assume that TCP implements an extension that allows window sizes much larger than 64 KB. Suppose…
A: Using the slow start, the sending rate is increased exponentially rather than linearly. The windows…
Q: The_________________ statement, when executed in an iteration statement or a switch, causes an…
A: The do, for, switch, or while statement that is immediately around the break statement is…
Q: What factors influence network communication performance?
A: Given: In terms of network performance, reaction time refers to how soon a message can be delivered…
Q: The______________ is used to test a particular variable or expression for each of the constant…
A: Lets see the solution.
Q: Q5) Using RSA algorithm, Assume: p= 7 , q = 13, e = 5, d = 29. c) What is the ciphered text if the…
A: The RSA algorithm:- Two Primes are chosen, p and q. Now, compute the value of n = p *q and z =…
Q: A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2,…
A: Logic , if there are n micro- operation then we can represent it in form of 2n where n will…
Q: 10. Suppose a router has three input flows and one output. It receives the packets listed in Table…
A:
Q: (i) Every tree (V, E) can be 2-colored, i.e., there is f: V→ {0, 1} such that f(u) ‡ f(v) for all…
A: Q1: Which of the following are correct?(i) Every tree (V,E) can be 2-colored, i.e., there is f: V…
Q: Consider a forwarding station A on a SONET STS-1 line, receiving frames from the downstream end B…
A: The question has been answered in step2
Q: Following the development and testing of individual software modules, they must be combined and…
A: Introduction Software development alludes to PC programming, which is the most common way of…
Q: Q5) Using RSA algorithm, Assume: p= 7 , q = 13, e = 5, d = 29. b) What is the public key and private…
A: RSA Algorithm:1) Calculate value of n = p xq, where p and q are prime no.'s2) calculate (n) = (p-1)…
Q: Urgent solve using C++ Notes: The maximum size of any c-string in this lab is 100…
A: Here is the c++ program See below steps.
Q: Write a c++ code that takes a 4-digit binary number as an input and converts it into decimal then…
A: Here is c++ program to implement the 4 digit binary number and convert into decimal point. See below…
Q: What is the output produced by the following code? int a=2, b=4; for (int i=0; i<9; i++) a+=2; b+=4;…
A: Given Code public class Question{ public static void main(String []args){…
Q: Urgent solve using C++ Notes: The maximum size of any c-string in this lab is 100 characters and…
A: The answer is given below.
Step by step
Solved in 4 steps with 2 images
- Scenario As you surely know, due to some astronomical reasons, years may be leap or common. The former are 366 days long, while the latter are 365 days long. Since the introduction of the Gregorian calendar (in 1582), the following rule is used to determine the kind of year: if the year number isn't divisible by four, it's a common year, otherwise, if the year number isn't divisible by 100, it's a leap year. otherwise, if the year number isn't divisible by 400, it's a common year. otherwise, it's a leap year. none of the above year int(input("enter the year")) if (year%4 1-0) and (year%400 -0) or (year % 1000): print (year is common year") else: print(year, is leap year") year= int(input ("enter the year")) if (years !-0) or (year480 1-0) and (year % 1001-0): print(year is common year") else: print(year, "is leap year") D year= int(input("enter the year"))2) A BMI Calculator: the body mass index (BMI) is a measure used to determine whether a person is overweight or not. We can calculate BMI from the weight of the person (in pounds) and the height (in inches) of the person. The formula for calculating BMI is: BMI = (weightInPounds 703) divided by (heightInInches squared) In this problem, you will have to create a BMI calculator, i.e., a Java program, that reads the user's weight in pounds and height in inches, then calculates and displays the user's body mass index BMI. Also, display the following information from the US Department of Health) so the user can evaluate his/her BMI: BMI values: Underweight: less than 18.5 Normal: between 18.5 and 24.9 Overweight: between 25 and 29.9 Obese: 30 or greaterAn Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance
- The quadratic formula is used to solve a very specific type of equation, called aquadratic equation. These equations are usually written in the following form:ax2 + bx + c = 0The Quadratic Formula x = ( -b ± √( b^2 - 4ac ) ) / ( 2a ) Where a, b, and c are constants with a ≠ 0. (If a = 0, the equation is a linear equation.)The discriminant is the part of the formula in the square root. If the value of the discriminant is zero then the equation has a single real root. If the value of thediscriminant is positive then the equation has two real roots. If the value of thediscriminant is negative, then the equation has two complex roots.Write a program that finds the roots of the quadratic equation using the Quadratic Formula. Write a function named discriminant in the file, Disc.py, to calculate and return the discriminant of the formula. Let the main function call the discriminant function and then calculate the solution(s) of the equation. Do not calculate the solutions in the discriminant…Question: 1A perfect number is an integer that is the sum of its positive proper divisors (all divisors except itself). For example, 6 is a perfect number. The divisors of 6 except itself are 1,2 and 3. The sum of the proper divisors of 6 is 6. Thus 6 is a perfect number. You have to take integers as input and continue taking input until the word “STOP” is given as input. After taking the inputs you have to classify the integers as Perfect and Imperfect and store it in a dictionary(Please see the output for better understanding).[Note: You CANNOT use any built in functions EXCEPT input(),range(),print()]Sample Input :61082528100496530STOPSample Output:(No need to follow the output format. Just print the resultant dictionary.){Perfect: [6,28,496],Imperfect: [10,8,25,100,530]}Transient PopulationPopulations are affected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths. Write a program that displays the size of a population for any number of years. The program should ask for the following data: The starting size of a population P The annual birth rate (as a percentage of the population expressed as a fraction in decimal form)B The annual death rate (as a percentage of the population expressed as a fraction in decimal form)D The average annual number of people who have arrived A The average annual number of people who have moved away M The number of years to display nYears Write a function that calculates the size of the population after a year. To calculate the new population after one year, this function should use the formulaN = P + BP - DP + A - Mwhere N is the…
- The body mass index, BMI, is a measure used to determine if a person is overweight or not. We can calculate BMI from the weight of the person (in pounds) and the height (in inches) of the person.The formula for calculating BMI is:BMI = (weightInPounds * 703) divided by (heightInInches squared)In this problem, you will develop a Java program as a BMI calculator, that reads the user’s weight in pounds and height in inches, then calculates and displays the user’s body mass index BMI. Also, display the following information {from the US Department of Health} so the user can evaluate his/her BMI:BMI values:Underweight: less than 18.5Normal: between 18.5 and 24.9Overweight: between 25 and 29.9Obese: 30 or greaterWhen 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.)(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.
- (Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.The programming language is C++, write a program base on the given statement. 1. An employee’s weekly working hours is 40. If an employee exceeds40 hours, it is considered overtime. Create a program that will acceptthe number of hours worked by employee and his / her hourly rateand print the gross pay and overtime pay rendered, if there’s no OTpay to print, print only the gross pay. To compute for the gross pay of an employee, multiply the number of hours worked by his/herhourly rate plus his/her OT pay. OT hours are time rendered byemployee over 40 hours. The overtime hours rendered should becomputed by using 1.50% of his hourly rate.Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 – payment * d2) / d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest = averageDailyBalance * 0.0152 Instructions Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month (interestRate). The program outputs the interest. Format your output to two decimal places. Input: 100 30 50 7 9.7 Output: 856.83 Test case 2: Input: 255.76 31 55 3 12.3 output: 3080.38