program
Q: Write a function named "location_of_largest" that takes as its arguments the following: (1) an array...
A: logic:- In function take array and size as parameter. set max=0 declare an index array that will s...
Q: Exactly what are the hazards of implementing an always-on security infrastructure are you asking you...
A: Critical infrastructure security design is critical in defining how an organization operates over ti...
Q: Draw figures to show the steps of inserting sequentially "Dhaka", "Sylhet", “Barishal", "Chittagong"...
A: Order of insertion:- Dhaka, Sylhet, Barishal, Chittagong, Rajshahi Sorted Order:- Barishal, Chitta...
Q: If the circles are MAX nodes and the squares are MIN nodes, what is the minimax value of this game t...
A: If the circles are MAX nodes and the squares are MIN nodes, the minimax value is 4. It looks like a ...
Q: What parameters should be sent to the range constructor, to produce a range with values 50, 60, 70, ...
A: CODE;- lst = [n for n in range(50, 81, 10)]print(lst)
Q: Drop down box helps the user to edit the formulas faster. TRUE OR FALSE
A: A drop-down list in Excel, often known as a drop-down box or a combo box, is a tool for entering dat...
Q: Determine the hash (in hexadecimal) of the message M using Martyas-Meyer-Oseas hash function. mes...
A: Given data is GIVEN MESSAGE IS DAB9 NOT AB12 PLEASE SHOW HOW TO DO THE PROBLEM USING DAB9• Block ...
Q: MODELLING AND SIMULATION 1. How do project parameters affect the simulation? 2. How the PM contro...
A: 1. there are four factors – time, cost, quality and quantity – these are important parameters. Ti...
Q: the reason why a numeric field is often allotted far more space than any initial values that are pla...
A: Lets see the solution.
Q: Compare and contrast the benefits and drawbacks of cloud computing.
A: The term "cloud computing" has a single significant meaning. Cloud computing is distinct from tradit...
Q: 3) Finally, write a couple sentences describing what conclusions you can draw about performance on t...
A:
Q: Why does it take so long to get software finished?
A: Software is the programs and routines for a computer or the program material for an electronic devic...
Q: Suppose you generate the following RSA key pairs: •p = 37199 •q = 49031 •N = p•q = 1823904169 • (p -...
A: The Answer is
Q: Write a function print_numbered_items (items) that takes a list of items and prints them one per lin...
A:
Q: oject? Give a sample situation. 2. What is the best way to plan a simulation project? Why? 3. Does...
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: Correct errors
A: Array is similar type data collection Only when assigning array[30]=30 give segmentation fault.
Q: Assume there are five methods with process ID and burst time given below P1:6, P2:5, P3:2, P4:3, P5:...
A: The Answer is
Q: Design an application that has an array of at least 20 integers. It should call a module that uses t...
A: public class Main{ public static int linearSearch(int arr[], int searchValue) { int cou...
Q: If the execution times of P1, P2, P3, and P4 processes are 50, 30, 90, and 80. respectively, and the...
A: The Answer is in Below steps
Q: Write a short Python function that takes a sequence of integer values and determines if there is a d...
A: The function find() checks if the list contains two distinct number whose product is odd. Inside the...
Q: Fill in the code according to the following comments 1/set pins 1,2,3,5 to digital enabled on port 3...
A: Providing code according to the comments. Comments : set pins 1,2,3,5 to digital enabled on port ...
Q: 2- consulting D, Character, verify that: a) The characters of classes C, and C, are for all irreduci...
A: As per our guidelines we are suppose to answer only the first question. Kindly post the remaining qu...
Q: Data Abstraction and Problem Solving with C++ How many comparisons would be needed to sort an array ...
A: Summary: In this question, we have been asked that how many comparisons will be done when we sort th...
Q: Distinguish between an associative and a direct-mapped cache.
A: In this question, we are asked about the difference between a totally associative cache and a direct...
Q: Write a java program to find the duplicate element in an integer array without using any other data ...
A: Required:- Write a java program to find the duplicate element in an integer array without using any ...
Q: 1. A long-winded, encrypted transmission has been intercepted. Frequency analysis of the entire tran...
A:
Q: Assembly language is converted into executable machine code by a utility program referred to as an a...
A: The answer is
Q: What exactly is random access memory (RAM) and how does it work? Make two distinct lists of the thin...
A: Random access memory (RAM) and it work
Q: You have been given the equation below to solve: f(x1, x2) = (x1 – 4)² + 5(x2)? a) The constraints f...
A: Answer: our guidelines is answer the first three question from the first question. we will answer fi...
Q: Write a java program to find the perimeter of the parallelogram. Take all requirements from user
A: code : - // for user input import java.util.Scanner; public class Main{ public static void main(St...
Q: Write a C program that will ask the user to input 20 integers. The program will count and display th...
A: Code :- //Importing library #include <stdio.h> //Main of the code int main() { //Variable dec...
Q: Please write the Java code for a Time class: Leave comments as explaination for how the code work...
A: Solution: Given, import java.util.Scanner; class Main{publicstaticvoid main(String args[]){Scann...
Q: Compare and contrast WAD and PAD
A: Answer : WAD ; A tiny mass. to converted into wad or tiny mass of some materials. to wad a gun.
Q: lef cost_to_hike_naive(m: list[list[int]], start_point: tuple[int, int], end_point: tuple[int, int])...
A: Answer: I have done code in python and also I have attached code as well as code and output.
Q: Write a function convert_to_millimetres (measurements) which takes a list of measurements in centime...
A: Here I have created a function and inside the function, I have used a for loop to iterate over the l...
Q: Based on your knowledge, what is information and communication technology (ICT)?
A: About information and communication technology (ICT)
Q: Consideration of common characteristics while forming a class hierarchy is critical when developing ...
A: You assign characteristics to higher-level classes in a class hierarchy with inherited characteristi...
Q: My java code keeps giving me back StringIndexOutOfBounds for the following code. Need help dealing ...
A: Sometimes the input or movie name might be having less than 2 characters In such case substring(0,2)...
Q: JavaScript Array Decending Sort Sort the array in descending order: 40,100,1,5,25,10 100,40,25,10,5,...
A: define a function called mySort that takes arrayName as parameter. iterate from i=0 to i<arr....
Q: -2. The minimal number of states require for the DEA that accepts the set of all strings where cach ...
A: The answer is
Q: Write a program using recursion that computes the sum of the series: 1^2+5^2 +6^2+11^2+ 17^2 +28^2 +...
A: The Answer is in Below Steps solving in Python Program
Q: Demonstrate how to use Python’s list comprehension syntax to produce the list [1, 2, 4, 8, 16, 32, 6...
A: List comprehension is used to create a new list from a existing list, array, tuples. etc. List compr...
Q: 4. Calculate the perceptron network if there are 3 inputs x,=1.7, x,-5.9, x,-3 and b= -1.8. Synaptic...
A: The answer is
Q: Write a ruby program to spilt the string(user-taken) across the given character
A: Required:- write a ruby program to spilt the string(user-taken) across the given character. Approach...
Q: 3d
A:
Q: Python Code only You are given integers N, R and K. Consider all permutations of the integers 1 thro...
A: As per the above-given question we have to create a code in Python that finds the k lexicographicall...
Q: nd contrast between predict
A: Given A comparison and contrast between predictive analytics, prescriptive analytics, and descri...
Q: Find the diagram of the five related unctions of x: y1 = 2 sin(x), y2 = tan(x), y3 %3D =0.5 * cos(x)...
A: Since a and b values are not mentioned, I am taking it as pi/4
Q: Write a java program to find the perimeter of circle after taking radius from user
A: Write a program using java which to find the perimeter of the circle.
Q: If you reject H0 when H0 is correct, what type of error is this? Question 15 options: a Type I ...
A: Hyроthesis testing is аn асt in stаtistiсs whereby аn аnаlyst tests аn аssumрtiоn regаr...
This
(1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangle_char character. (1 pt)
(2) Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character. (2 pts)
Example output for triangle_char = % and triangle_height = 5:
Enter a character: % Enter triangle height: 5
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangle_char character. (2) Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character. Example output for triangle_char = % and triangle_height = 5: Enter a character: % Enter triangle height: 5 % % % % % % % % % % % % % % %Code should be in Python, please. This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangle_char character. Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character.* In python * This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given program outputs a fixed-height triangle using a * character. Modify the given program to output a right triangle that instead uses the user-specified triangle_char character. (2) Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character.
- Your program needs to provide the user of choice of multiplying, adding or finding absolute difference (i.e. the magnitude of the difference) of two user-entered integers. Use the following starter code to complete your program. • Inside your loop, prompt the user to choose the desired operation by entering a character. The program should work the same whether the user enters the choice in uppercase or lowercase characters. • Inside a switch-block create suitable case blocks for multiplying, adding or finding absolute difference along with a default case. Use an enumeration constants for the cases. • The user may enter an incorrect character, which should execute the default case. In this scenario, inform the user of the incorrect choice and ask for the user to enter again. Keep on doing this until the user enters the desired character. Choose a suitable condition for the while statement of the do-while loop to implement this feature. You may choose to create a Boolean variable…Write a program that uses a for loop and the range function to generate a table of areas and circumferences of 10 circles with radii from 10 to 100 in increments of 10. See Required Output below. The radii should display centered in a column 10 characters wide with 1 decimal place. The areas should be centered in a column 14 characters wide with 4 decimals and the circumferences should be centered in a column 18 characters wide with 3 decimals. For full points, include centered column headings as shown. I also need pseudocode. Thanks so much!Modify the program to use a loop to output a right triangle of height triangle_height. The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches triangle_height. Output a space after each user-specified character, including a line's last user-specified character. Example output for triangle_char = % and triangle_height = 5: Enter a character: % Enter triangle height: 5 % % % % % % % % % % % % % % %
- Use C++ codingWrite a program that calculates a student's GPA. Ask the user to enter grade and also the credit hours of the course in a loop until user enter “N” or “n”. Earned points in that course becomessum of all points in all subjects/ Total credit hours i.e.,GPA= sum of earned points in all subjects/total credit hoursGrade points of each grade are as followsGRADE GRADE POINTSA 4B 3C 2D 1F 0FOR EXAMPLEYou got “A” grade in Computer Programming theory course and the credit hours are 3.So your earned grade points=4*3=12 Similarly if you get “C” grade in another subject e.g., Computer Fundamentals and the credit hours are also 3 here. Now earned grade points = 2*3=6If you get “B” grade in Circuit and Systems theory and the credit hours are 3. So yourearned grade points=3*3=9 Now your GPA = (12+6+9) / 9 = 3PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07 26 1998. The program will print the number of days elapsed from 01 January of that year, i.e. January 1st is always 1 and December 31 is either 365 or 366, depending on if leap year or not. SPECIFICATIONS: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment. - Save your cpp file as TEST CASES: If a user inputs a valid int month, date, and year: Enter MM: 05 Enter DD: 18 Enter YYYY: 1995 Result: 138 days If a user inputs an invalid int month, date, and year: Enter MM: 02 Enter DD: 29 Enter YYYY: 1997 Result: INVALIDWrite a C++ (use cout and cin )program that calculates a student's GPA. Ask the user to enter grade and also the credit hours of the course in a loop until user enter “N” or “n”. Earned points in that course becomes Grade point * credit hours i.e., Earned points = Grade point*credit hours Grade points of each grade are as follows Grade Grade Points A = 4 B = 3 C = 2 D = 1 F = 0 Example: You got “A” grade in Computer Programming theory course and the credit hours are 3. So your earned grade points=4*3=12 Similarly if you get “C” grade in another subject e.g., Computer Fundamentals and the credit hours are also 3 here. Now earned grade points = 2*3=6 If you get “B” grade in Circuit and Systems theory and the credit hours are 3. So your earned grade points=3*3=9 Now your GPA = (12+6+9) / 9 = 3
- ISP- Java Write a program that will output a right triangle based on user specified input height (int) and specified input symbol (char). The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches specified input height. Output a space after each user-specified character, including after the line's last user-specified character. Hint: Use a nested for loop. Ex: If the input is: Enter a character: * Enter triangle height: 8 the output is: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *Need help with Python - program4_1.py Write a program that uses a for loop and the range function to generate a table of areas and circumferences of 10 circles with radii from 10 to 100 in increments of 10. See Required Output below. The radii should display centered in a column 10 characters wide with 1 decimal place. The areas should be centered in a column 14 characters wide with 4 decimals and the circumferences should be centered in a column 18 characters wide with 3 decimals. For full points, include centered column headings as shown.Required OutputPRG8: Write a program that accepts dates written in numerical form and outputs in complete form. Enter date in number form : 5 26 1986 scanf(“%d %d %d”, m,d,yy); Your date in complete form is : May 26, 1986 PRG9: Write a program that will calculate and show bills of the Manila Electric Company. The rates vary depending on whether the use is residential (R), commercial( C) , or industrial (I). Any other code should be treated as an error. The program should accept the subscriber ID, Subscriber Name, his total electrical consumption in a month, and the code of the consumer type. The rates are computed as follows: R: 50 plus .50 per kwh used C: 100 for the first 1000 kwh and 0.45 for each additional kwh I: 180 for the first 1000 kwh and 0.75 for each additional kwh