PW2 Report Dharvin 10DTK21F1007
PW2 Report Dharvin 10DTK21F1007
PW2 Report Dharvin 10DTK21F1007
SESSION: 2021/2022
CLASS : DTK2B
ITEM \ STUDENT S1 S2 S3 S4
1. Fixes /10 /10 /10 /10
S2
S3
S4
PRACTICAL SKILL ASSESSMENT PERFORMANCE OF STUDENT DURING EXECUTION OF PRACTICAL WORK 1-6
CLO2 Build programs written in C language for assigned mini project during practical work sessions
PLO5 Apply appropriate techniques, resources, and modern engineering and IT tools to well-defined engineering
problems, with an awareness of the limitations (DK6);
DK 6 Codified practical engineering knowledge in recognised practice area
Marks
Item 10 8 6 4 2
The program works The program The program The program The program
Fixes and all error are produces 4 produces 3 correct produces 2 correct produces 1
fixed correct results results results correct result
The program works The program The program The program The program
and complete all complete 4 complete 3 complete 2 complete 1
Complete
statements statements statements correctly statements statements
correctly correctly correctly
The program works The program The program works The program The program is
and meets all of the works and meets and produces the produces correct producing
specifications and all of the correct results and results but does incorrect
Manipulates The code is specifications. displays them not display them results.
exceptionally well correctly. It also correctly.
organized and very meets most of the
easy to follow. other specifications.
The use of flowchart The flowchart The flowchart have The flowchart have The flowchart
symbols and its have one error in two errors in the three errors in the have more
sequence is correct, the symbols or symbols or sequence symbols or than three
Builds from step 1 to end sequence of step of step sequence of step errors in the
and well organized symbols or
and very easy to sequence of
understand. step
All outputs is correct. 1 output is 2 outputs incorrect. 3 outputs 4 outputs
incorrect. incorrect. incorrect.
Measurements are Measurements are
both accurate and Measurements mostly accurate Measurements Measuremen
precise are accurate Observations are are somewhat ts are
Observations are with reasonable generally complete inaccurate and incomplete,
very thorough and precision Work is organized very imprecise inaccurate
may recognize Observations Only 2 or 3 minor Observations are and
possible errors in are thorough errors using incomplete or imprecise
data collection Work is symbols, units and recorded in a Observations
Display Work is neat and generally neat significant digits confusing way are
organized and organized There are 3 or incomplete
Includes Includes more minor or not
appropriate symbols, units errors using included
symbols, units and and significant symbols, units Symbols,
significant digits digits and significant units and
digits or 2 major significant
errors figures are
not included
A program
solution is not
submitted or
is
The program submitted but
The program
1 program compiles visual
All the program compiles successfully
compiles not successfully and inspection of
compiles successfully and
successfully provides a the code
Test and provides a provides a successful
provides a successful solution indicates that
description successful solution solution to the
solution to the to the the submitted
and results to the problem problem situation for
problem problem situation code is less
situation. some but not all
situation. for some but not all than 50%
input
input complete as
would be
required to
solve the given
problem
.
Unable to
Efficiency Unable to solve Unable to solve all solve all the
Able to solve all
some of the the problems, but problems, but
Able to solve all the the problems
problems, but manage to fix all manage to fix
problems correctly correctly with
manage to fix all the the problems some of the
without supervision. minimum
problems correctly correctly with problems
supervision.
with supervision. supervision. correctly with
supervision.
Program runs Program code Program code Program code Program code
without errors and contains minimal contains significant contains major has not been
Source code produces correct errors amounts of code errors and completed
results have not been produces incorrect
completed results
TOTAL
(100%)
ELECTRICAL ENGINEERING DEPARTMENT
Define IF statement
Answer: one way decision statement
True
Statement 1 Statement 2
End
End
Write the syntax for SWITCH Statement Draw flowchart for SWITCH Statement
Answer: Answer:
switch(expression)
start
{ cas
e
1: statement(
break;
expression
case
2 : statement(
break; Case 1
case
Statement (s)
3 : statement(
break; Case 2
…
… Statement (s)
case
n : statement( default
break;
default : statement(s); Statement (s)
}
next_statement; End
PART B: PRACTICAL WORK AT LABORATORY
Practical Assignments 1 (Fixes Program)
To calculate series and parallel circuits.
Series parallel
Find an errors and correct the programme to illustrate the working of IF-ELSE statements to calculate the
total resistance for series and parallel circuit. Get the output after fixes all errors
#include <stdio> Correction:
main() #include<stdio.h >
{ main ()
int selection; {
float series, parallel; int selection;
float R1=100,R2=300, R3=500; float series, parallel;
printf("1: Series Circuit\n"); float R1=100,R2=300, R3=500;
printf("2. Parallel Circuit \n"); printf("1: Series Circuit\n");
printf("Please Select your choice \n "); printf("2. Parallel Circuit \n");
scanf("%d", $selection); printf("Please Select your choice \n ");
IF (selection==1) scanf("%d", &selection);
{ if (selection==1)
series = R1+R2+R3; {
printf(" Total resistance = %.2d Ohm\n",series); series = R1+R2+R3;
} printf(" Total resistance = %.2f Ohm\n",series);
else if (selection==2) }
{ else if (selection==2)
PARALLEL = 1/(1/R1 +1/R2+1/R3) ; {
printf(" Total resistance = %.6f Ohm\n",parallel); parallel = 1/(1/R1 +1/R2+1/R3) ;
} printf(" Total resistance = %.6f Ohm\n",parallel);
else }
{ else
printf(" wrong choice \n "); {
} printf(" wrong choice \n ");
return 0; }
} return 0;
}
Output:
If selection =2
Practical Assignments 2 (Complete Program)
RT = R1 + R2 + R3
Series parallel
Complete all statements in the programme below to illustrate the working of SWITCH statements to calculate
the total resistance for series and parallel circuit. Get the output after fixes all errors
#include <stdio.h>
main()
{
Int ;
float series, parallel,R1,R2,R3;
printf("******************************************");
printf("\nEnter the value of R1= ");
scanf( );
printf("\nEnter the value of R2= ");
scanf("%f",&R2);
printf("\nEnter the value of R2= ");
scanf ( );
printf("******************************************");
printf("\n1: Series Circuit");
printf("\n2. Parallel Circuit "); printf("\nPlease
Select your choice ");
printf("******************************************");
scanf("%d",&selection);
switch(selection)
{
case 1:
series = R1+R2+R3;
printf(" ”, );
break;
case 2:
parallel = 1/(1/R1 +1/R2+1/R3) ;
printf(" ”, );
break;
default:
printf(" wrong choice \n ");
}
return 0;
}
Output:
If choice =2 If choice =1
Practical Exercise 1: Manipulates Program 1
By referring to the Practical Assignments 2, draw flowchart and write a C program using SWITCH
statements to calculate the total capacitance of three capacitors of series and parallel connected. Get the
output of the programme. ( the formula of series and parallel capacitors are given below
Series parallel
Ask input from user the value of C1,C2 and C3
Flowchart :
Start
Accept C1,C2,C3
Select choice
False
Wrong choice Case 𝐶𝑇 = 𝐶1 + 𝐶3 + 𝐶3
default
True
1
𝐶𝑇 =
1 1 1
+ +
𝐶1 𝐶2 𝐶3
Display CT
Program:
Output:
If choice =1 If choice =2
Practical Exercise 2: Manipulates Program 2:
By referring to the Practical Assignments 2, draw flowchart and write a C program using IF-ELSE
statement to make a choice for calculate:
Choice 1: Total resistance of the circuit, Rtotal
Choice 2: Current, I
Flowchart :
Program:
Output:
Case 1
Case 3
Discussion for practical work 2
From this practical work 2, I have understood selection statements such as if and switch and apply in codin
In conclusion, I have fixes, complete and manipulates the selection statement and builds flowchart of selectio