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.
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.
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