Writer a program to ask the user for his first name and then to print it using a function.(we don’t expect any first name to exceed 20 letters don’t define the array of the first name as a global variable).
Q: In Java, give an example of a method that requests Name input. Then show another method, in the same…
A: The Java example shown shows two methods in a basic application. The user is prompted to enter a…
Q: a. Write a program that uses the sequential search to see if you have won the Michigan daily 3 using…
A: Algorithm: Michigan Daily3 Lottery Check1. Initialize a list of standing three-digit numbers.…
Q: What are some best practices for using hardware effectively?
A: Effective hardware usage involves regular maintenance,software updates,data backups, temperature…
Q: identify one title related to Teamwork and collaboration. Then identify 5 reputable articles from…
A: The title is "Enhancing Teamwork and Collaboration in the Workplace: Strategies for Success."1.…
Q: What are the key differences between waterfall and agile development strategies?
A: Software development is the creative process of designing, coding, testing, and maintaining computer…
Q: I have a working code, but seems to be missing where to add the floating decimal point with changing…
A: The objective of the question is to format the floating point number to display two decimal places…
Q: Q3. Consider a logical address space of 4,048 pages with a 2 KB page size, mapped onto a physical…
A: Physical memory refers to the actual hardware components used by a computer to store data, including…
Q: Describe the advantages and disadvantages of an application security lifecycle?
A: The process of incorporating security policies and safeguards throughout the whole software…
Q: List 4 parameters for a multilevel feedback queue
A: The Multilevel Feedback Queue (MFQ) scheduling is an advanced algorithm used by operating systems to…
Q: Which phase of the data warehouse development life cycle involves defining the data sources and…
A: Large volumes of data from multiple sources are stored, consolidated, and managed inside an…
Q: kiosks, enterprise computing, natural language processing, robotics, and virtual reality support…
A: technologies such as kiosks, enterprise computing, natural language processing, robotics, and…
Q: Explain volatile, synchronized, transient keywords.
A: In Java a keyword is a word with a predefined meaning in Java programming language syntax.Reserved…
Q: Using Java Create a GUI program for a food ordering process for a restaurant. The system should…
A: In this question we have to write a java GUI program for food ordering process for a resturant as…
Q: Compute the following values of ψ(X, B), the number of B-smooth numbers between 2 and X. (c) ψ(50,…
A: Thе function ψ(X, B) rеprеsеnts thе numbеr of B-smooth numbеrs bеtwееn 2 and X. B-smooth numbеrs…
Q: Develop a C++ program that computes both the sum and average of all integers from 1 to n…
A: This C++ program computes the sum and average of all integers from 1 to n, inclusive, after asking…
Q: How many distinct ways are there to reorder the letters in the word nonsense? Please write down you…
A: The objective of the question is to find out the number of distinct ways to reorder the letters in…
Q: What is the purpose of the exec system call?
A: A system call is a controlled entry point through which a computer program requests a service from…
Q: what is a Firewall for?
A: The question asks for an explanation of the purpose of firewalls, specifically in the context of…
Q: Create a Crow's Foot Notation ERD for Journal of E-commerce Research Knowledge
A: The field of e-commerce research continues to evolve at a rapid pace, driven by advancements in…
Q: The memory block requests are in the following order- 11, 5, 10, 8, 0, 6, 3, 9, 16, 20, 17, 25, 18,…
A: Direct-mapped cache with 8 cache blocks (blocks 0-7).Memory block requests: 11, 5, 10, 8, 0, 6, 3,…
Q: 6.4-4. Self Learning Switches (a). Consider the network below with six nodes, star-connected into an…
A: A sеlf-lеarning switch is a type of nеtwork switch that can automatically lеarn thе MAC addresses of…
Q: Suppose you are to design a program that prompts the user to enter a String and displays the number…
A: Below is the algorithm for the given Java code, which counts the number of vowels, consonants, and…
Q: Write a java program to obtain the factorial of 20.
A: Import the `java.math.BigInteger` class for working with large integers.Define a method called…
Q: which of the following accesses a variable in structure b? b>var; b->var; b-var; b.var;
A: Structure is a user-defined data type. Using structure, the various data types can be combined.It…
Q: This question is about the procedure linearSearch, which was discussed in the lectures. 1…
A: Linear search is a basic algorithm used in computer science to locate a specific element within a…
Q: There are two tribes on the island of Tufa: the Tu's, who always tell the truth, and the Fa's, who…
A: The island of Tufa is home to two distinct tribes: the Tu's, known for their unwavering commitment…
Q: What are the different types of software dependencies and how do they impact software development?
A: The process of developing software is intricate and sometimes requires integrating several parts to…
Q: 2. Write a SQL statement to create the structure of a table dup countries similar to countries.…
A: Create table structure:-Create table Table_name(column1 datatype, column2 datatype, column3…
Q: we will write a function to compare the suitability of various alien planets for a space colony.…
A: Input: planet_name - The name of the planet entered by the user.Load Data:i) Load the planet data…
Q: What are the different metrics that can be used to measure the success of a software development…
A: When it comes to software development, evaluating the efficiency and effectiveness of a project is…
Q: What are the key performance metrics for computer hardware?
A: In this question we have to understand about the key performance metrics for computer hardware?Let's…
Q: How do you put a 2D array code into a function? (C++ only)
A: In this question we have to understand how to put 2D array code into a function using C++Let's…
Q: AVA PROGRAM ASAP
A: Create a Java program that tests whether a given string is a palindrome or not, and ensure it passes…
Q: / lab8ExB.cpp #include using namespace std; void insertion_sort(int *int_array, int n); /*…
A: In this question we have to understand and write the C++ code for the insertion methods as per the…
Q: write in c++ Two words are said to be anagrams if they contained the same characters but in…
A: Step1: We have initialized the two words1 and word2Step2: Then we have ask to user to take the…
Q: Write an application for Nina’s Cookie Emporium named CookieDemo that declares and demonstrates…
A: The question does not specify any particular programming language for the solution. We have done the…
Q: Step 0 3 8 2 X N' u 4 2 6 -W- 3 D(v),p(v) (a) Z W D(w),p(w) (b) X D(x).p(x) (c) Z D(y).p(y)…
A: Dijkstra's algorithm is a widely used method for finding the least-cost path in a network,…
Q: Q2. Use the dependency diagram shown below to work the following problems. Initial dependency…
A: A functional dependency is a term used in the database which defines the relationship between the…
Q: Describe how companies can use Big Data to gain a competitive advantage?
A: Big Data refers to extremely large data sets that are so voluminous and complex that traditional…
Q: Use guick sort to sort the following array {6, 2, 5,9, 4, 2, 3, 7, 1, 8, 5). Any observations here?…
A: One well-known sorting algorithm that adheres to the divide-and-conquer strategy is Quicksort.…
Q: Consider the following code snippet: vector num(3); num [0] = 1; num [1] = 2; num [2] = 3;…
A: In the given problem, we have the following C++ programming language given:1vector<int>…
Q: 1.Step: Specify 3/24 subnets from 10.172.0.0/16 2.Step: Assign to 3 Vlan which are name Finance,…
A: You would have to take a number of steps, such as subnetting, VLAN setting, IP address assignment…
Q: Create two game trees for Euclid's game using a range of numbers from [1, 50]. State the pair of…
A: Euclid's game is a mathematical two-player game that involves selecting numbers within a given…
Q: 6.3B-5. Multiple Access protocols (5). Consider the figure below, which shows the arrival of 6…
A: let's delve into a brief overview of the CSMA/CD (Carrier Sense Multiple Access with Collision…
Q: Why is it important to evaluate software dependency?
A: Software dependency is measure of how much a component of a software system is dependent on the…
Q: Write a program that generates N random numbers between 1 and 1000. The program should print out a…
A: 1. is_prime(n) Function:Input: A positive integer n.Output: Returns True if n is prime, and False…
Q: What are some of the the issues of jursidiction when conducting e-commerce transactions for buyers…
A: The question is asking about the challenges or issues related to jurisdiction that both buyers and…
Q: What are the different types of DevOps tools and practices?
A: DevOps, a combination of development and operations practices, relies on a variety of tools and…
Q: Develop a methodology for assessing the risk of software dependencies.
A: Risk Assessment is a process used to identify, evaluate, and prioritize potential risks or…
Q: Create a python computer program that has the user to input the highest temperature for each day of…
A: Hеrе is an algorithm for your program:Crеatе a list to storе thе tеmpеraturеs for еach day of thе…
Writer a
Step by step
Solved in 4 steps
- Write a function which solves a projectile problem. As input, the function will take the initial height (y0) from which the projectile is launched, the initial velocity, and the angle in degrees which the initial velocity makes with the horizontal (positive if above the horizontal, negative if below the horizontal). The function should calculate the time T the projectile stays in air, generate a time array (0, T/100, 2T/100, 3T/100, …, T), and return the values of x and y (the components of the position vector of the projectile) at the times in the array. Plot the projectile trajectory using matplotlib. Use phyton language pls put output screenshot import mathimport numpy as npimport matplotlib.pyplot as plt%matplotlib inlineWrite a function which solves a projectile problem. As input, the function will take the initial height (y0) from which the projectile is launched, the initial velocity, and the angle in degrees which the initial velocity makes with the horizontal (positive if above the horizontal, negative if below the horizontal). The function should calculate the time T the projectile stays in air, generate a time array (0, T/100, 2T/100, 3T/100, …, T), and return the values of x and y (the components of the position vector of the projectile) at the times in the array. Plot the projectile trajectory using matplotlib. Use phyton languageUsing C++ Write the section of code which takes an array of characters and copies it to another array of characters. At this point two arrays of characters should hold the same name. You will need to use one of the loop instructions to do this. You can't use any built in functions. Write a second section of code which concatenates two arrays of characters into a third array of characters. The first array (which holds the first name) will be copied into the third array and the second array (which holds the last name) will be concatenated onto the third array. Once you are done filling in the arrays you should output the two sentences below. You are given the example input and output below.Example Input: Input first name -> FredInput last name -> SmithExample output: Your first name is Fred and the copy of your first name is Fred. Your first name is Fred and your last name is Smith and the concatenation is FredSmith.
- Writer a program to ask the user for his first name and then to print it using a function.(we don’t expect any first name to exceed 20 letters don’t define the array of the first name as a global variable). USING C++good stat ofl them ii days. You need to upload your solutions in a single python file (assl.py) to the link on MS Teams. Part 1 Add this comment: # Ass 1: Part 1 Write a program that declares a function called draw Star which receives an integer value as a parameter, and draws a number of stars equal to the received integer. Samplel: Please enter the number of stars: 5 The shape is: **** Sample2: Please enter the number of stars: 3 The shape 15 *** Part 2 Add this comment: Ass 1: Part 2 Write a program that summation of even ni "nd M then prints the 3.9 nclud d if were even of 3Write a function that takes two string parameters and their common length. It fills out the second array with the capital form of the first parameter. Test your function in the main program.
- In C++ language For number 2 through 4 create an integer array with 100 randomly generated values between 0 and 99; pass this array into all subsequent functions. Place code in your main to call all the methods and demonstrate they work correctly. Using just the at, length, and substr string methods and the + (concatenate) operator, write a function that accepts a string s, a start position p, and a length l, and returns a subset of s with the characters starting at position p for a length of l removed. Don’t forget that strings start at position 0. Thus (“abcdefghijk”, 2, 4) returns “abghijk” Create a function that accepts the integer array described above returns the standard deviation of the values in a. The standard deviation is a statistical measure of the average distance each value in an array is from the mean. To calculate the standard deviation, you first call a second mean function that you need to write (do not use a built in gadget. Then sum the square of the difference…An automated donation machine accepts donations via 10 or 20 bills to a maximum of $990. The machine needs to print a receipt with the donation amount in English, rather than numerically. Complete the following function which converts any number between 10 to 990 dollars to English.NOTE: You may define and use another function if necessary.NOTE: You should use arrays for this task. Use of switch statements or very long if/else if statements for printing is not allowed. However, using if/else if/else statements for the logic of your algorithm is permitted.NOTE: This function returns the result, and does not print it. Make sure the result is not lost when you return. Example function input and output (donation is 110):Input: 110Output: “one hundred ten dollars” string convertToEnglish (int donation); in C++ #include <iostream>#include <string>using namespace std; string convertToEnglish (int donation); int main() {int donation;cin>>donation;…Write a C user defined function array and a value which you want to find in the array. (function may be needs more parameter to perform it) The function should check values of the array and if it find the same value in the array, it should return the position in the array (just first one). If there is no match, it should return "-1" Example: if array is {1,2,5, 3, 10, 5) and if the search term is "10" function must return 4, If the search term is "5" function must return 2, If the search term is "9" function must return -1,
- You should write a function called Fire that will take an X and Y coordinate and print “HIT” if a ship is hit and “MISS” if a ship is missed. If a ship is HIT you should update the array with an ‘H’ character to indicate the ship was hit. If a ship is hit that has already been hit at that location you should print “HIT AGAIN”. You should write a second function called FleetSunk that will determine if all the ships have been sunk. Your C++ program must then call these functions until all the ships have been sunk at which point the program should display “The fleet was destroyed!”. Question: Why is miss not appearing in the function.Imagine that you are a biomedical engineer analyzing DNA sequences. You have numerical measurements from two different measurement sources, m1 and m2, both of which are arrays. Write a function named dna that takes these two arrays as inputs. It should return a character array string of nucleotides (represented by the letters A, C, G and T). For a given index, i, the nucleotide in the string is: - ‘A’ if m1(i) >= 0 and m2(i) >= 0 - ‘C’ if m1(i) < 0 and m2(i) >= 0 - ‘G’ if m1(i) >= 0 and m2(i) < 0 - ‘T’ if m1(i) < 0 and m2(i) < 0 code to call the function m1 = [-2 -3 2.5 0.3]; m2 = [1.1 2.1 -0.8 0.1]; sequecne = dna(m1,m2); function dna Please use MATLABQ2: In this question, you will write a Python function to compute the Hadamard product of two matrices. The Hadamard product is the "component-wise" product of two matrices. That is, each entry of the product matrix is equal to the product of its corresponding entries of the input matrices. Here is an example: a11 a12 a21 a22 a23 a31 a13 SH a32 033 A b11 b12 b13 b21 b22 b23 b31 b32 b33. B = [an bu a21 b21 a31 b31 a12 b12 a22 b22 a32 b32 a13 b13 a23 b23 a33 b33. Hadamard product of A and B Write a Python function to compute the Hadamard product of two matrices as follows. a) The inputs to the function are two matrices. b) The function should check whether the two matrices have the same size. If not, it should print "The input matrices are not of the same size". c) If two matrices are of the same size, the function computes the Hadamard product and returns the answer. Use for loops to compute the Hadamard product.