c: Concepts of programming Language 4. a) Consider the following JavaScript program: var a, y, c; function sub1() { var b, z, c; function sub2() { var a, b, y;
Q: program accepts the height of a person in centimeter and categorise the person according to their he...
A: Here in this question we have given a incomplete code segment and we have asked to find the correct ...
Q: What happens if a process calls wait before it has called fork, i.e., it has no children?
A: If a process calls wait before it has called fork then wait() function will return immediately
Q: 1. How is data exchanged between components acco
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: Write three advantages and disadvantages, of the major traffic components. Provide table
A: The distinction between disadvantage and advantage as nouns is that disadvantage is a flaw or unwant...
Q: What are the ramifications of a situation at an interface where more input may be entered into a dat...
A: Introduction: An interface condition in which more input may be loaded into a buffer or data holding...
Q: what is the key Connect records of one kind to records of another.
A: Introduction: A one-to-one connection is a link between two tables of data in which each entry occur...
Q: test-driven development to be successful. For example, if you wanted to use it a
A: Test driven development is nothing but preparation of the test cases before development of the code ...
Q: Give example of Substring from IndexOf in JAVA.
A: Substring refers to the part of the string as when we call substring function then it prints the pa...
Q: Bookm. Suppose the HTML file for your web page project includes a div element with the id value "cup...
A: what should be placed in the blank to complete the function
Q: Using Kotlin Make up four students - add them into an array. Create a function for the class that...
A: We need to rectify errors in the program.
Q: 5: Truth tables are used to establish the validity of complex sentences. Show and explain how they e...
A: Truth table is basically used to represent the propositional logic or to check statement assertion i...
Q: Determine whether the two bipartite graphs below have a perfect matching. Justify your answer, eithe...
A: Bipartite Graph means that a graph whose vertices can be divided into two disjoint and are independe...
Q: Two keywords can be used in ACL to replace the address or the wildcard mask. O Host and some O Host ...
A:
Q: Explain why public key encry the Internet than private (sh
A: given - Explain why public key encryption is more useful for securing communications on the Internet...
Q: Write a Java program to create a server that listens to port 5006 using stream sockets. Write a simp...
A: Note: The given program is a general program. Kindly change the class name and other specifications ...
Q: Define a Prolog predicate rdup(L,M) to remove duplicates from an ordered list L. The resulting list ...
A: Here we write simple prolog code to remove duplicate list: ================================== Here w...
Q: What are the benefits and drawbacks of fiber-to-the-home and fiber-to-the-business networks?
A: Introduction: Fibre to the home refers to the construction and usage of optical fibre from a central...
Q: Determine the most often used file characteristics and operations, as well as a short explanation fo...
A: Provide a succinct explanation for each of the three qualities of a file in the following format: 1)...
Q: What are the distinctions between on-premises data center and cloud security solutions in terms of I...
A: Introduction: This removes the requirement for an internet connection and assures that data is alway...
Q: f 64KB is hav $ 24 bits. Th to the cache s. е са
A:
Q: Consider the following MIPS assembly sw $t0, 4($sp) sw $ra, 0($sp) jal sum_to Why are the registers ...
A: We need to provide logic for points mentioned about JAL instruction in MIPS.
Q: What are the distinctions between Computer Science and Computer Engineering?
A: Introduction: Computer science (CS) and computer engineering (CE) are both high-tech disciplines con...
Q: What is an Object Repository, and how does it work? In Selenium, how can we make an Object Reposito...
A: Introduction: What is an Object Repository, and how does it work? In Selenium, how can we make an O...
Q: What exactly is data visualisation, and how does it function?
A: Data Visualisation can be defined as any graphical allocation or representation of any information o...
Q: The four key computational stages for image generation are? with definition
A: Answer the above questions are as follows:
Q: Could you clarify what cloud scalability implies and how it works? What are some of the features of ...
A: Introduction: Cloud scalability refers to the capacity to increase or decrease the quantity of infor...
Q: Given that the options for a set of radio buttons within the customOrder web form share the name att...
A: the value of the color option selected by the user in the colorvalue variable by executing the java...
Q: Create a function to determine the total pledge amount for a project. Use the function in an SQL sta...
A: SQL stands for standard query language.It is a domain specific language used in programming and desi...
Q: 1a.Provide a style that changes the font size over a 2-second interval and the font color over a 3-s...
A: Find the answer given as below :
Q: С++ x=2; y=4; cout <<x++<<--y; w 23 34 33 O 24
A: Here, I have to choose an option for the above question.
Q: What are some of the benefits of data modeling?
A: Given: What are the advantages of data modelling?
Q: What is the common name for AMD's Hyper-Transport CPU feature?
A: Introduction the question is about What is the common name for AMD's Hyper-Transport CPU feature and...
Q: 3. You have an open map document that has ten layers including one named SEWERS that has a line geo...
A: The raster data model is widely used in applications ranging far beyond geographic information syste...
Q: What are the advantages and disadvantages of the Arduino x86 in terms of its strengths, limitations,...
A: Given: What are the advantages and disadvantages of the Arduino x86 in terms of its strengths, limit...
Q: How can I open the file txt on my computer?
A: Introduction: the question is about How can I open the file txt on my computer and here is the solut...
Q: You work in Marketing and are planning a sales campaign for household products and wish to know deta...
A: Since no details are mentioned, I am assuming there is another table along with Product and that is ...
Q: Should the cardinality between entities be translated/read from both ends of the notation when deali...
A: Introduction: Cardinality: Cardinality refers to the maximum or lowest number of components permitte...
Q: What exactly are the distinctions between computer organisation and computer design?
A: Introduction What exactly are the distinctions between computer organization and computer design?
Q: What does an Abstract Data Type (ADT) mean?
A: Introduction: ADT stands for Abstract Data Type, which is a type (or class) for objects whose behavi...
Q: What are the risks connected with using the MD5 algorithm to sign certificates?
A: Given: What are the vulnerabilities associated with signing certificates using the MD5 algorithm?
Q: Suppose we have a virtual address of 26 bits in a byte addressable machine. Page size is 8K bytes. A...
A: Suppose we have a virtual address of 26 bits in a byte addressable machine. Page size is 8K bytes. A...
Q: What exactly are cloud-based backup systems, and what are some of their advantages?
A: Cloud based backup can be defined as it is a service which contains data stored on remote server so...
Q: Insecure Cryptographic Storage Challenge 3 The result key to this level is the same as the encryptio...
A: The answer is an given below :
Q: Digits to word. In the class program Example0903-DigitsToWords.py we can enter a sequence of numbers...
A: Use a try-catch block to validate the input and then while iterating print the respective number
Q: In MongoDB, what precisely is a Document?
A: Introduction: In MongoDB, a document is a basic unit or building piece of data.
Q: Java Program 1. JA’s GYM Equipment rents gym equipment such as dumbbell, kettlebell, Treadmill, Barb...
A: logic:- read number of minutes from user. Get number of hours=minutes/60 calculate remaining minut...
Q: One of the following hacker is using their programming skills for good ethics and they inform the de...
A: Please find the correct answer and proper explanation for both correct and wrong answers in the foll...
Q: Make a Java program that perform arithmetic operations using any variable that you want. For. exampl...
A: Please refer below for your reference: import java.util.*; class Compute { public static void ...
Q: Write a program to calculate y from the equation using (switch) statement (3x-7(x=-5) y=(5x')f(x=2)o...
A: We need to write C++ code for given situation.
Q: Obtain an image, preferably one with lines in it, and take its Radon transform. Similar to part 1, i...
A: import numpy as npimport matplotlib.pyplot as pltimport cv2 # Get the imageimg = cv2.imread('image.p...
Topic: Concepts of
4. a) Consider the following JavaScript program:
var a, y, c;
function sub1() {
var b, z, c;
function sub2() {
var a, b, y;
. . .
}
. . .
}
function sub3() {
var a, x, w;
. . .
}
List all the variables, along with the program units where they are declared,
that are visible in the bodies of sub2 when the sequence of function call is:
“sub1 calls sub3 and sub3 calls sub2”, assuming dynamic scoping is used.
Step by step
Solved in 2 steps
- Programming - C Language Find the code of the following: 1. FORGIVEN!! Yeeey!! Thanks to your help, my friend Lionel Richie forgave me! In return to his kindness and compassion, I want to give him a gift. I'm thinking of giving him straight up cash! I've already prepared something in advance, I just need your help to complete it. Instructions: In the code editor, you are provided with a main() function that asks for an integer input from the user which represents the cash to be given to Lionel and passes it to the getGift() function call. The getGift() function is already declared and partially defined. Your task is to complete the function definition. The getGift() function multiplies the passed integer value by 3 and then checks if the result is even. If it is, the getGift() function adds 100 to the result. Otherwise, it adds 200 to the result. The getGift() function would then return the result as the return type of this function is int. Input 1. Cash amount…PLEASE CODE IN PYTHON Problem Description An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other. Input Specifications The input for the program will come from an input file in.dat, in.dat will have two lines of data, line (1) will have the first phrase and the line(2) will have the second phrase. You may assume that the input only contains upper case letters and spaces. Output Specifications The program will print out one of two statements: ”Is an anagram.” or, ”Is not an anagram.” All output will be to the screen. Sample Input CS AT WATERLOO COOL AS WET ART Output for Sample Input Is an anagram.Mathematical functions introduced in chapter 4 can be used in the mathematical calculations and simulations of the engineering and scientific problems. In these cases, we formulate the mathematical problem and then use the computer for calculations and simulations. Can a computer code solve the math problem and come up with mathematical formulas, i.e. can a computer program do what a mathematician does?
- C PROGRAM / C LANGUAGEMake a C program array. Situation:Conduct a survey for investigatory project to ask how satisfied the students are with the current state of our school. Use a rating system of 1 to 10. There are a lot of people who answered the survey and you could not accurately tally the number of people who answered 1, or 10, or any other number in between.Convert to C# Language def Deposit(balance, pin): # Deposit function p = int(input("Enter the PIN: ")) # taking PIN from user if p == pin: # if PIN matches with actual PIN amount = float(input("Enter deposit amount: ")) # taking deposit amount from user balance += amount # adding deposit amount to balance else: # else (if PIN not matches) print("Incorrect PIN!!") # display message return balance # return balance def Withdraw(balance, pin): # Withdraw function p = int(input("Enter the PIN: ")) # taking PIN from user if p == pin: # if PIN matches with actual PIN amount = float(input("Enter withdraw amount: ")) # taking withdrawal amount from user if amount > balance:…Read problem carefully. • Solve problem using 5-steps of Engineering Problem Solving Methodology (including algorithm) Draw flowchart diagram Write a C++ program Problem Statement: An election is a formal group decision-making process by which a population chooses a candidate by casting votes. Each candidate is assigned name and a specific symbol. A ballot paper is used to cast the vote. Each ballot paper contains symbols of the candidate. A person can vote a candidate by stamping on a specific symbol. The ballot paper should be considered as a spoilt ballot if a person does not stamp or stamp on more than one symbol. Finally ballot paper has to be dropped in a ballot box. Write a C++ program that reads the information from the user to enter the name of the candidate, the total number of received votes, and the spoilt votes in a local election. The total number of participants (candidates) are 5. If the user mistakenly enters any negative value, the program should consider that value…
- Topic: Recursive Function A bank increases the interest rate it gives to its customers by 1% every month the money stays in the bank. Write the recursive function that calculates the total amount of money at the end of the maturity date, based on the condition below. The parameters of the function: capital, initial interest rate and maturity date(months) Note: Codes should be written in C programming language.III. Instructions Develop a function pseval implementing a Maclaurin's Series calculator and visualizer. It must have the following features: 1. Calculator Mode ▪ It must take in a function handle f, in terms of x and n, containing the power series representation of a function, the number of terms n to be included in the computations, and a scalar value x that will be used to evaluate the function. The program must automatically execute this mode if there are exactly 3 input arguments. ▪ The output will be a scalar value y which is the value of the evaluated function. 2. Visualizer Mode ▪ It must take in a function handle f, in terms of x and n, containing the power series representation of a function, the number of terms n to be included in the computations, and the left and right boundaries x_1 and x_r that will be used in plotting the function. The program must automatically execute this mode if there are exactly 4 input arguments. ▪ Using the left boundary, the right boundary, and…Code using c++ 3. From Person to People by CodeChum Admin Now that we have created a Person, it's time to create more Person and this tech universe shall be filled with people! Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and character value for its gender. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. In the main() function, there's a pre-created array of 5 Persons. Your task is to ask the user for the values of the age and gender of these Persons. Then, once you've set their ages and genders, call the displayPerson() function and pass them one by one. Input 1. A series of ages and genders of the 5 Persons Output Person·#1 Enter·Person's·age:·24 Enter·Person's·gender:·M Person·#2 Enter·Person's·age:·21 Enter·Person's·gender:·F Person·#3 Enter·Person's·age:·22 Enter·Person's·gender:·F Person·#4…
- Task - Using pointers to process arrays (C Language) Example #5 below expected output is 45, but from the program below its coming out to 46. Please help make it come out to 45 as expected In a TV show, each minute can be either interesting or boring. Assume that if 7 consecutive minutes are boring, then an average viewer will stop watching the show. Write a C program that calculates how many minutes that an average viewer will watch a TV show, given the interesting minutes. Assume the TV shows are 45 minutes long. Requirements Name your program project4_minutes.c. Follow the format of the examples below. The program will read in the number of interesting minutes, then read in the interesting minutes. The program should include the following function. Do not modify the function prototype. int find_minute(int *minutes, int n); minutes represents the input array for interesting minutes, n is the length of the array (the number of interesting minutes). The function returns the how…JAVA CODE PLEASE 2. Functions With Parameters and Return Values Practice ll by CodeChum Admin Create a function named compare that receives three integer arguments and compares them. Return the integer with the greatest value. In the main function, create a program that asks for three integer user inputs and assign it to an integer variable. Call the compare function by passing the three integer variables in the actual parameters and assign the returned value to a variable. On the next line, print the value assigned to the variable. Input 1. One line containing the first integer 2. One line containing the second integer 3. One line containing the third integer Output Enter·number·1:·1 Enter·number·2:·2 Enter·number·3:·3 Greatest:·3Tracking laps Learning Objectives In this lab, you will practice writing functions, passing arguments and returning results from the function printing the result of a function call writing your code as a module Instructions Main Idea An Olympic-size swimming pool is used in the Olympic Games, where the racecourse is 50 meters (164.0 ft) in length. "In swimming, a lap is the same as a length. By definition, a lap means a complete trip around a race track, in swimming, the pool is the race track. Therefore if you swim from one end to the other, you’ve completed the track and thus you’ve completed one lap or one length." (Source: What Is A Lap In Swimming? Lap Vs Length) Write the function meters_to_laps() that takes a number of meters as an argument and returns the real number of laps. Complete the program to output the number of laps with two digits after the period. Examples Input: 150 Output : 3.00 Input: 80 Output: 1.60 Your program must define and call the following…