Programming question and answers for July 21, 2023
- Q Download the attached file/s, copy and paste the code segment/sinto your visual studio or any other C++ IDE and run it. You willhave to implement a small intentional bug in...
- Q Using Euler method, ODE45 and Simulink solve the following ODE's.a) y+c(dy/dt)=10sinwtc=2, w=10, y(0)=0Assume time span 0: 0.01: 10b) dy/dt=t^2+yzdz/dt=t+y^2z^2y(0)=0.2z(0)=-0.1Assume time span 0: 0.1 :1c)(d^2)y/dt^2+0.5(dy/dt)+siny=0y(0)=1dy/dt =0 when t=0assume time span 0:...
- Q Python , no strings, len(), or indexingWrite the function setKthDigit(n, k, d) that takes three# non-negative integers -- n, k, and d -- where d is a singledigit# (between 0...
- Q Programming Assignment 1: Representing, Managing andManipulating Travel OptionsYou may NOT do any of the following:change any of the function names or signatures (parameter listsand types and return type)introduce any global...
- Q Assignment 3 Note:Tables referred in this assignment are same as that ofAssignment 2.1. For each table, append your student id along with the tablename. For e.g. employee_student id (employee_T16363737)2. Format...
- Q Write a program in python programming language toimplement/simulate a finite automaton that accepts (only): unsignedinteger numbers // 123, 007, 4567890, etc. Show: Finite AutomatonDefinition, Graph, Table.
- Q 11) Enter the following using Java.Use for loop to enter student id, student name, major andgrades. Also grades should display their letter grades based ontheir conditions.After that display the name...
- Q 10) Create a java program that will ask for name and age withmethod age where it will check the condition that id you aregreater than 18 you can vote.
- Q - Create a java class named SaveFile in which write thefollowing:Constructor: The class's constructor should take the name of afile as an argumentA method save (String line): This method should...
- Q Circle Class Write a Circle class that has the following membervariables: • radius: a double • pi: a double initialized with thevalue 3.14159 The class should have the following member...
- Q Question 1 - Create a class namedStudent that has fields for an ID number, numberof credit hours earned, and number of points earned. (For example,many schools compute grade point averages...
- Q 1.Consider hashing with a table size of 100 and a hash functionof key%tablesize. Insert 25 keys. Do you expect to see anycollisions? Why or why not?Yes, because random values likely...
- Q q1)Critically assess how the computer monitor image differs from atelevision image and analyse the limitations in creating images onthe computer destined for a television screen
- Q Create a GUI application in C# that calculates and displays thetotal travel expenses of a business person on a trip. Here is theinformation that the user must provide:• Number of...
- Q Modify the code below to support specifying additional dice typein addition to a 6 sided dice.For example, the program could support six-sided, eight-sided,10 sided die.HINTS: You will need toCreate an...
- Q 2. Define a function max_n(arr, n) that takesin an array and an integer as arguments. Your function will thenreturn the n largest values from that array as anarray containing n...
- Q In this forum, discuss business rules and how they influencedatabase design. Explain what is data modeling and why data modelsare important.Submission Format:Initial post must be made 2 or more days...
- Q Next Day Cargo Company needs an integrated application withtheir system that sorts the cargo with respect to their weight anddistributes the weight evenly (if possible) between the givenvehicles. Note that...
- Q InJSF practically speaking in terms of coding what is the differencebetween a managed bean and an unmanaged bean
- Q Online resumes are the new way to apply foremploymentThe Internet now plays an integral role in how people search forjobs, as well as how employers and companies find appropriatecandidates. According...
- Q Consider the following sentences. Use BACKWARD CHAININGand draw the proof tree to prove that “Charlie is ahorse.â€Horses, cows, and pigs are mammals.An offspring of a horse is a horse.Bluebeard is...
- Q Whats the code to open a text file and every line in that textfile that starts with # then it should delete that line In pythonusing .strip
- Q Question: How can the code below be implemented injava?TreapNode* deleteNode(TreapNode* root, int key){    // Base case    if (root == NULL) return root;      // IF KEYS IS NOT AT ROOT    if (key < root->key)        root->left =deleteNode(root->left,...
- Q Show that L = {(a2)^i| i ≥ 0} is not accepted by a finite automata.
- Q (6 marks- 3 marks each) The following hexadecimal values areshorthand for 16-bit two’s complement binary numbers. Workingpurely in hex, negate each and then state whether the result ispositive or negative.(a)...
- Q C++ application that calculates the sales at the end of the day.Need to know how much money I made on selling my famous bananamuffins each day. At the end of...
- Q C++ Zybook Lab 16.5 LAB: Exception handling to detect inputstring vs. intThe given program reads a list of single-word first names andages (ending with -1), and outputs that list with...
- Q write a fully-connected neural network to work with MNIST andTensorflow 2.x. The labels will be input and MNIST image vectors asoutput labels. use tf.GradientTape instead fit. show the 28x28image with...
- Q JavaProject Requirements:1.Write a Java program that plays aword game with a user. The program asks the user questions and thencreates a paragraph using the user’s answers.2.The program must perform thefollowing:a.Uses...
- Q IN PROGRAMMING LANGUAGE C-I am trying to alphbetize a string in descending ortoEXINPUT: B C D AOUTPUT:DCBA#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>int main(int argc, char*argv[]){Â Â Â Â Â Â Â int MAX = 100000;Â Â Â Â Â Â Â int i...
- Q Stack2540Array  import java .io .*;import java . util .*;public class Stack2540Array {int CAPACITY = 128;int top ;String [] stack ;public Stack2540Array () {stack = new String [ CAPACITY ];top = -1;}1public...
- Q Q3. (Real World Research) Mom in our MP store isconcerned about customer records and maintaining the integrity oftheir records and the other stores they currently own.Objective: Create a simple 150-word...
- Q You can only use built in Lisp functions and you cannot use setqfunction.Write a function in Lisp called f1 that counts the number oflists in a list. Example: (f1 ‘(a...
- Q In this program, you are modifying given code so that the classis object-oriented.2. Write a Java class called CityDistancesOO in a class file calledCityDistancesOO.java. Â Â 3. Your class will still make...
- Q Consider the following splay tree:Show the paths from root to node 12, 10, 9, 5, and 1 aftersearch node 3. (Sample answer: for the above splay tree, the pathfrom root...
- Q On rare occasions, computers have been designed which use one’scomplement base 2 representation. Consider the decimal expressionbelow: 7 + (-3)= 4(a) Convert all three numbers to 4-bit one’s complement base2.(b)...
- Q Consider the following code: void swap(int arr[], int i, int j) {Â Â Â Â Â Â Â int temp = arr[i];Â Â Â Â Â Â Â arr[i] = arr[j];Â Â Â Â Â Â Â arr[j] = temp;}void function(int arr[], int length){Â Â Â Â Â Â Â for (int i = 0;i<length / 2; i++)Â Â Â Â Â Â Â Â Â Â Â Â Â Â swap(arr,i,...
- Q You have been asked to create a python program that will ask theuser how many tickets the user would like to purchase forgraduation. The user will then choose the number...
- Q Using Tkinter for GUI, A Python program that will allow the userto perform (i) generate RSA keys, (ii) encrypt a given message and(iii) decrypt the message without using any cryptographic...
- Q Why would log-structured merge trees be inappropriate (bad) foran application like git that manages source code? Explain
- Q for an array A of size N, and A[0] != A[n-1]. devise anefficient algorithm for find a pair of elements A[i] and A[i+1]such that A[i] != A[i+1]. can you always...
- Q Roster method and Set builder notation1. Use the roster method to list the members of thesesets.A = { y | y is the square of an integer and y <...
- Q Arrays Assignment in Java1. Suppose you are doing a report on speeding. You have the datafrom 10 different people who were speeding and would like to findout some statistics on...
- Q How can I reduce data set by deleting any rows that have allFALSE bool values for every column inthat row using pandas. Assuming there are 20+ columns/rows to loopthrough. Example:...
- Q Let f1(n) and f2(n) be asymptotically nonnegative functions.Using the formal definition of Θ-notation, prove that max(f1(n),f2(n)) = Θ(f1(n)+f2(n)).
- Q 1.make a c++ program that generates a random number 1to 100 usingrand().user gets 5 attemptsstop program when they get it rightfind out which guess was the closest to the actual...
- Q Assignment requirementsYou will be creating your custom Set (think a list of uniqueelements) class in C++. Please do NOT use STL, or any pre-definedlibrary for this assignment.1. The data type...
- Q Can you please take this code and just rewrite it so it can beeasily be able to put into a complier. in javaImplementation of above program in java:import java.util.HashMap;import java.util.Scanner;import...
- Q In Java1. Which term best describes a \"A uses B\" class relationship? wordanswer:2. choose correct one:What are some of the ways a class can exhibit dependency?A. A class can invoke...
- Q 1. programmers often refer to a _____ search as a \"divide andconquer\" procedurea. bubbleb. binaryc. divisiond. split2. you can add an item at any point in a _______ container andthe...
- Q D-Latch is a simple clocked memory element inwhich the output is equal to the stored state inside theelement.In D-Latch the state is changed whenever the appropriate inputschange and the clock...
- Q For Machine Learning, onequestion.......................................................................................1) Discuss the relation between feature scaling and the gradientdescent algorithm. To be precise, discuss how feature scaling canaffect the gradient descent algorithm?
- Q In DHCP discover message, what is the source address and what isthe destination address? What are their special meanings?
- Q 1. Write a program which simulates rolling dice. It should:Display the random number rolled Ask the user if they want to rollagain. If they don't want to roll again, the...
- Q How does streaming traffic differ from browsing traffic(in terms of network utilization)?
- Q JAVA DATA STRUCTURE (Linked Lists/Queue)public class Node {Â Â int value;Â Â Node nextNode;Â Â Node(int v, Node n){Â Â Â Â Â value = v;Â Â Â Â Â nextNode = n;Â Â }Â Â Node (int v){Â Â Â Â Â this(v,null);Â Â ...
- Q Input a phrase from the keyboard. For example, input couldbe:Today is a rainy day, but the sun is shining.Your program should count (and output) the number of \"a\"s in thephrase,...
- Q Begin by defining the data type Point that hastwo coordinate members x and y. Specifically,Point will be implemented as a structure; defineoperators as needed to satisfy problem requirements.b, prompt the...
- Q There is no question the router plays a vital role innetworking. If this device were to be controlled by an attacker,then the entire CIA goal can be violated. As such,...
- Q Complete a) flowchart solution and b)working Python solution. It will need to compare genesequences, looking for differences (mutations), keeping track ofhow many are different and will include clear two-part output:indicating...
- Q IN C LANGUAGE ONLY PLEASE!First Program:create branchloop.c fileContent of the programEnter your name while running your program as you did withhello2.c (using argc and argv) name has to be 2...
- Q write the code in pythonDesign a class named PersonData with the following membervariables:lastNamefirstNameaddresscitystatezipphoneWrite the appropriate accessor and mutator functions for thesemember variables. Next, design a class named CustomerData , whichis...
- Q Create a python program that will:prompt a user for a commandCommandget_dataLevel 1: Take one of the commandsmy_maxmy_minmy_rangemy_summeanmedianmodefibfactorizeprimeRequirements:Your commands should be case-insensitiveYou should use python lists to store dataYou should NOT...
- Q Task 4The class Polynomials is a collection of polynomials of eitherimplementation stored in an instance of thegeneric library class List.class Polynomials{private List<Polynomial> L;// Creates an empty list L of polynomialspublic...
- Q What are the principle security hardening steps for a virtualmachine environment?
- Q Provide a summary of WPA2 and WPA3. How is WPA2 more secure thanWPA? How is WPA3 more secure than WPA2? Does WPA3 still havevulnerabilities?
- Q Discuss with the class the importance of program design (usingpseudocode and/or flowcharts) when designing programs utilizingselection structures.
- Q Discuss why naming conventions are important and why as aprogrammer you should consistently follow them. Include in thisdiscussion, problems that could arise in naming variables if oneconvention is NOT followed.
- Q Use attribute directives to display credit card logo based onthe credit card number Use simplified rules as follows:4 visa5 mastercard34 and 37 amex30, 36, 38, 39 diners60, 64, 65 discover
- Q (a) Assume that a polynomial-time primality testing algorithm,calledPrimes is available, which takes as input a single numbern>1 and outputs whethernis a primenumber or not. Now consider thefollowing algorithm:Input: A natural...
- Q 7. Use the substitution & method of INSERT command topopulate EMP_PROJ table. INSERT INTO EMP_PROJ VALUES (‘&empNo’,‘&projNo’, &hoursWorked); NOTE: enclose &empNo in ‘ ‘if the datatype is a string –...
- Q 3) Create a Java program that uses NO methods, but usescanner:Write a program where you will enter the flying distance fromone continent to another, you will take the plane in...
- Q white a class having two private variables and one memberfunction which will return the area of rectangle
- Q modify the speech bubble code to expand and contrastaccording to the size of the speech.
- Q SHOW SCREEN SHOTS OF THE INPUT AND OUTPUT AS WELL AS THERESULTSPROGRAMMING IN PERLTask 2: Variables2.1 Scalar VariablesA scalar is a single unit of data. That data might be an...
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!