logo

Crowdly

In24-S1-CS1033 - Programming Fundamentals

Шукаєте відповіді та рішення тестів для In24-S1-CS1033 - Programming Fundamentals? Перегляньте нашу велику колекцію перевірених відповідей для In24-S1-CS1033 - Programming Fundamentals в online.uom.lk.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Which of the following Register is typically used to store the status of the last ALU operation?

Переглянути це питання

CPU “ALPHA” requires an average of 5 clock cycles to complete one instruction and runs at a 1 GHz clock.  The CPU “BETA” requires 20 clock cycles on average to complete one instruction and runs at a 2 GHz clock. Both CPUs have the same instruction set.  Which of the following statements are true when both CPU executes the same program.

Переглянути це питання

The ALU of a Central Processing Unit is:

Переглянути це питання

Embedded computers are:

Переглянути це питання

Which of the following is NOT a CPU register?

0%
50%
0%
Переглянути це питання

Please submit the flowchart diagram that illustrates the algorithm of your program here.

Переглянути це питання
  1. Plot a line graph for acceleration against time for each model. Plot the lines for all three models in the same graph. Then submit your plotted graphs.

Example graph:

 

Image failed to load

Note: You must plot and submit the graphs. If you do not submit, then the submission will be incomplete and will not be accepted.

Переглянути це питання

Exercise L7.E2

EcoMotion Autos is a car manufacturing company. They are conducting research regarding their 3 brand new car models that are going to be released next month. You have been requested to assist them by helping them to analyze the data taken during the test drive. 

You are provided with three input files model1.txt, model2.txt and model3.txt containing the speed measured at the end of each time interval. 

Example input files : 

model1.txt       
model2.txt        
model3.txt         
0      0

100    1

200    5

300    13

400    29

500    57

600    68

700    78

800    89

900    99

1000   111
0	0

100 1

200 7

300 12

400 31

500 63

600 74

700 89

800    98

900 107

1000 120
0	0

100 5

200 15

300 21

400 39

500 55

600 69

700 81

800     101

900 113

1000 122

  • First column in each file is the time measured in milliseconds. 
  • Second column is the speed measured in kilometers per hour. 

Note: The time values for every input file are the same. (0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)

In this lab, you need to develop a python program to calculate and output the maximum acceleration reached by each car model during the test drive using the provided skeleton code. Furthermore, you need to plot a graph of acceleration against time for each car model. Refer the Lab 7: Beams and Cars L7.E2 for instructions.

Please submit the flowchart diagram that illustrates the algorithm of your program here.

Переглянути це питання

Exercise L7.E1

You are given a file containing data about multiple beams. Each line in the file represents data for one beam, formatted as follows:

                 Length YoungsModulus MomentOfInertia Load

  • Length: The length of the beam in meters.
  • YoungsModulus: The Young's modulus of the material in GPa (Gigapascals).

  • MomentOfInertia: The moment of inertia of the beam's cross-section in m4 (meters to the fourth power).

  • Load: The load applied to the center of the beam in kN (kilonewtons).

                 Example line:

                       5.0 210 0.0001 10

Note: The file name will be given as input.

Example Input File:

5.0 210 0.0001 106.0 200 0.0002 124.0 190 0.00015 87.0 250 0.0001 158.0 220 0.00025 20

Develop a python program to read the file and calculate the following for each beam:

  1. The maximum deflection at the center of the beam.
  2. The maximum bending stress at the center of the beam.

Note: The following formulas can be used.

Maximum deflection (Dmax) : 

            Dmax = P L3 48 E I

             Dmax = \frac{PL^3}{48EI} Dmax = \frac{PL^3}{48EI}

       where;                 P - load in Newtons, 

                 L - length, 

                 E - Young's modulus, 

                 𝐼  - moment of inertia.

Maximum bending stress (Smax​)

     Smax = \frac{PL}{4I} Smax = \frac{PL}{4I}

Please submit the flowchart diagram that illustrates the algorithm of your program here.

Переглянути це питання
What will be the output of the following Python code?

def ProcessList(L):

if(len(L) <= 1):

return L

else:

NL = ProcessList(L[1:])

NL.append(L[0])

return NL

print(ProcessList([1, 2, [31, [321], 33], 4, 5]))

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на online.uom.lk?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!