Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

2. Plot each variable listed below against time in a form of subplot. There should be 6 subplots in a single figure aligned in 2 columns and 3 rows. Use different line colour for each data. Add labels to all axes.


• time in seconds [Time]


• speed in km/h [Speed]


• gear [Gear]


• elevation in meters [Elv]


• SOC (state-of-charge) in % [SOC]


• battery voltage in V [Pack Volts]


• battery current in A [Pack Amps]


Knowing that average acceleration in a time interval ∆t = ti+1 − ti can be expressed as 𝑎𝑖 = 𝑣𝑖+1 − 𝑣𝑖 / ∆𝑡


where vi+1 − vi is the change in velocity between successive measurements,


write a code to: 

3) Calculate acceleration in m/s2 using speed and time data extracted from the dataset. Hint: You may use for ... end loop to complete this task.


Driving style Economic (1) Normal (2) Aggressive (3)


Acceleration magnitude [m/s2] 0.7-2.3 2.31-3.30 3.31-8.5


Table format: as seen above

Economic (1)

0.7-2.3

Normal (2)

2.31-3.30

Aggressive (3)

3.31-8.5


Make a program where it is asked from user to enter an amount, you have to answer how much annual tax to be paid on that amount. annual tax is 5.2% of total amount

Create a Python script which will accept a positive integer and will determine the input number if PERFECT, ABUNDANT, DEFICIENT.


PERFECT - if the sum of the divisors of the number except the number itself is equal to the number.


E.g. 6= 1, 2, 3, 6 1+2+3=6


ABUNDANT - if the sum of the divisors of the number except the number itself is greater than the number.


E.g. 12= 1, 2, 3, 4, 6, 12 1+2+3+4+6 = 16


DEFICIENT- if the sum of the divisors of the number except the number itself is less than the number.


E.g. 10= 1, 2, 5, 10 1+2+5=8


Sample Output:


Input a Positive Integer : 20


20 is ABUNDANT!



Please help me, thank you.

CS curriculum consists n courses, all mandatory. prerequisite graph G node each course, edge course v course w if and only if v prerequisite w. directly graph representation, computes minimum number semesters necessary complete curriculum student can take number courses one semester. running time your algorithm should linear. Input Format: input text file which describes prerequisite graph G. prerequisite graph G DAG. first line file specifies n & m, next m lines specify m edges graph, one line per edge. edge described end points. number vertices n, assume vertices graph numbered (0,1,..n-1). Output Format: Print minimum number of semesters required complete curriculum, given prerequisite graph, minimum number semesters will fixed number, there may be more one way taking courses each semesters. Sample Input ( graph shown right): 9 8 0 3 1 3 2 4 3 5 4 5 5 6 6 7 5 8 Sample Output Minimum number semesters: 5 Sem 1: 0, 1, 2 Sem 2: 3, 4 Sem 3: 5 Sem 4: 6, 8 Sem 5: 7


Enter two numbers then using user-defined functions, compute its sum, difference, product and quotient.

Given a directed graph, write a program to print all the strongly connected components of the graph. The runtime of your algorithm should be linear. Input Format: The input is a text file which describes an directed graph. The first line of the file specifies n & m, the number of vertices and number of edges in the graph respectively. The next m lines specify the m edges of the graph, one line per edge. An edge is described by its end points. If the number of vertices is n, assume that the vertices of the graph are numbered (0,1,..n-1). Output Format: Print the list of vertices in each strongly connected component, one line per component. (The order in which the SCCs are printed, and the relative order of the vertices within a given SCC does not matter.) Sample Input (for the graph shown on the right): 11 15 0 1 1 2 2 0 1 3 3 5 5 4 4 3 5 7 7 6 6 7 5 8 7 8 8 9 9 10 10 8 Sample Output : SCC 1: 8, 9, 10 SCC 2: 6, 7 SCC 3: 3, 4, 5 SCC 4: 0, 1, 2



Make classes to manage a cinema.

  • Use just strings and ints to keep things clear.
  • No need for get() and set()
  • Test your code with two hard-coded (no input()) objects of each class
  • A cinema has:
  • Movie:attrs: name, rating (int 1..5), length (two ints: hours and minutes)
  • methods: printM()
  • Snack:attrs: name, price, #calories
  • methods: printS()
  • Employee:attrs: name, dateHired
  • methods: printE()

The two most important protocols in the Transport Layer are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). TCP provides a reliable data delivery service with end-to-end error detection and correction. UDP provides a low-overhead, connectionless datagram delivery service. Suppose as a network administrator, you are required to select the most suitable transport layer protocol for a video streaming website then which protocol you will choose from UDP and TCP. Discuss your choice with 2 proper reasons.



  • script module that will let the user to enter his/her password and username, if username is "X" or "x", program will exit. if username and password are correct, a welcome message and the menu will be displayed . Otherwise, prompt the user for username and password again. program must perform the view, add or delete friend function depend on user input.
  • a myLogin module that will retrieve the information of the user given username and password.
  • a manageData module that will allow the retrieval, adding and deleting of friend(s).


The content of each file follow below format:


username1;[username2];[username3];

Input


1. data

Output


Enter·username:·prettyME
Enter·password:·1234
Welcome,·Rhea·Tortor!

1·-·View·Friend
2·-·Add·friend
3·-·Delete·Friend
X·-·Exit

Enter·your·choice:·X
Successfully·LogOut.
Enter·username:·X
LATEST TUTORIALS
APPROVED BY CLIENTS