Problem Solving Through Programming In C Week 3 Solutions

Problem Solving Through Programming In C | NPTEL 2023 | Week 3 Assignment Solutions

ABOUT THE COURSE :

Problem Solving Through Programming In C Week 3 Solutions

This course is aimed at enabling the students to
  1. Formulate simple algorithms for arithmetic and logical problems
  2. Translate the algorithms to programs (in C language)
  3. Test and execute the programs and correct syntax and logical errors
  4. Implement conditional branching, iteration and recursion
  5. Decompose a problem into functions and synthesize a complete program using divide and conquer approach
  6. Use arrays, pointers and structures to formulate algorithms and programs
  7. Apply programming to solve matrix addition and multiplication problems and searching and sorting problems 
  8. Apply programming to solve simple numerical method problems, namely rot finding of function, differentiation of function and simple integration

Course Status     :    Upcoming
Course Type        :    Elective
Duration               :    12 weeks
Start Date            :    23 Jan 2023
End Date              :    14 Apr 2023
Exam Date           :    29 Apr 2023 IST
Enrollment Ends :    06 Feb 2023

CRITERIA TO GET A CERTIFICATE :

Average assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

NOTE: Please note that there will not be an unproctored programming exam for this course this term.

Week 3 Programming Assignment 1 :-

Week 3 Programming Assignment 1
area = 3.14 * radius * radius;
  printf("Area of a circle = %0.2f\n",area);
}

Week 3 Programming Assignment 2 :-

Week 3 Programming Assignment 2
if(number<0.0)
     printf("Negative number.");
   else if(number==0.0)
     printf("The number is 0.");
   else
     printf("Positive number.");
     return 0;
}

Week 3 Programming Assignment 3 :-

Week 3 Programming Assignment 3
if (number%2==0)
    printf("%d is even.", number);
  else
    printf("%d is odd.", number);
    return 0;
  }

Week 3 Programming Assignment 4 :-
Week 3 Programming Assignment 4
if (n1>n2 && n1>n3)
    printf("%d is the largest number.", n1);
  else if(n2>n1 && n2>n3)
     printf("%d is the largest number.", n2);
  else
     printf("%d is the largest number.", n3);
    return 0;
  }
Join Now


Previous Year Questions Now to Boost Your Exam Performance

LOADS OF LOGIC