0% found this document useful (0 votes)
45 views9 pages

BTCO12107 Pps

Uploaded by

info.opustech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views9 pages

BTCO12107 Pps

Uploaded by

info.opustech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Sarvajanik University

Sarvajanik College of Engineering & Technology,


Surat
Bachelor of Technology (B. Tech.)

B. Tech. Semester I/II


Subject Name: Programming for Problem Solving Subject Code: BTCO12107

Type of course: Engineering Science


Prerequisite: Zeal to learn the subject
Rationale: To develop understanding of C and Python programming languages. Introduce and
build the required skills for problem solving through logical thinking. To achieve
proficiency in necessary skills for problem solving using C and Python
programming languages.

Teaching and Examination Scheme:


TEACHING SCHEME Theory Marks Practical Marks Total
L T P C TEE CA1 CA2 TEP CA3
2 0 4 4 60 25 15 30 20 150

CA1: Continuous Assessment (assignments/projects/open book tests/closed book tests CA2: Sincerity
in attending classes/class tests/ timely submissions of assignments/self-learning attitude/solving
advanced problems TEE: Term End Examination TEP: Term End Practical Exam (Performance and
viva on practical skills learned in course) CA3: Regular submission of Lab work/Quality of work
submitted/Active participation in lab sessions/viva on practical skills learned in course

Content:
Sr. Teaching Module
Topics
No. Hrs. Weightage
Introduction Programming and Problem Solving Concepts:
1. Programming languages - Machine level, Assembly level and high 02 5%
level languages, Problem solving using Algorithm and Flowchart
Fundamentals of C programming:
Introduction to imperative language (ANSI C), Structure of C program,
2. Variable Names, Data Type and Sizes, Type Conversion, Constants, 02 8%
Declarations, Operators, Precedence and Order of Evaluation, I/O
functions
Control structures - Branching and Looping:
Simple statements, Decision making statements - If statement, If-Else-
3. If statement, Switch statement. Looping statements - for construct, 03 20%
while construct, do-while construct, Nesting of control structures,
break and continue, goto statement.

40
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

Sr. Teaching Module


Topics
No. Hrs. Weightage
Arrays in C:
Array concepts - one-dimensional and multidimensional number and
4. 03 10%
character array, declaration and initialization of arrays, string built-in
functions
Functions:
5. Basics of functions - types of functions, prototypes, calling a function, 03 8%
parameters, passing of parameters, return types, recursive function
Pointers:
6. Basics of pointers, pointer and array, pointer and string, array of 02 8%
pointers, pointer as a function argument
7. Structures:
Basics of structure - defining, declaring, accessing structure members,
02 6%
structure initialization, structures and arrays, nested structures,
structure and functions
8. Introduction to Python:
The basic elements of python, input-output, Branching Programs, 02 5%
Control Structures, Iteration
9. Structured Types, Mutability and Higher-Order Functions:
03 9%
Strings, Arrays, Tuples, Lists and Dictionaries, Lists and Mutability
10. Functions, Scoping and Abstraction:
Functions and scoping, Specifications, Recursion, Global variables,
03 8%
Modules, Files, System Functions and Parameters, Functions as
Objects
11. Classes and Object-Oriented Programming:
Abstract Data Types and Classes, Inheritance, Encapsulation and 03 8%
Information Hiding
12. Python libraries:
02 5%
GPIO library, numpy, matplotlib, pandas

Suggested Specification Table of Marks


% Distribution of Marks
R Level U Level A Level N Level E Level C Level
20 40 40 0 0 0

41
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

Legends: R: Remembrance, U: Understanding; A: Application, N: Analyze, E: Evaluate C: Create


and above Levels.

Note: This specification table shall be treated as a general guideline for students and teachers. The
actual distribution of marks in the question paper may vary slightly from above table.

Reference Text Books:


Sr. Publisher and
Title of book Year of Publication
No. Author(s) details like
/article publication Edition
ISBN

Programming in Balagarusamy E Tata McGraw-


ANSI C Hill Publishing Eighth
1. 2019
Company edition
Limited
Let us C Kanetkar Y. P. BPB Publication Fifteenth
2. 2016
edition
Programming in B. Gottfried Tata Mc-Graw Fourth
3. 2018
C Hill Publishers edition
C Programming Kernighan B W and Prentice Hall Second
4. 2015
language Ritchie D M edition
Core Python R. Nageswara Rao Dreamtech Second
5. 2018
Programming edition
Fundamentals of Kenneth A. Lambert CENGAGE
Second
6. Python - First Publication 2019
edition
Programs

Course Outcome:
Sr. No. CO Statement Marks %
After learning this subject, students will be able to weightage
CO-1 Outline algorithm, flowchart and pseudocode for solving mathematical and 5
logical problems. (R,U,A - Cognitive level)
CO-2 Recall the principles of computer programming using 'C' programming and 10
Python programming language. (R,U,A - Cognitive level)
CO-3 Describe syntax, semantics, data types, conditional statements and control 35
structures in 'C' and Python language. (R,U,A - Cognitive level)
CO-4 Exemplify the concepts of array, strings and pointers dealing with memory 25

42
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

Sr. No. CO Statement Marks %


After learning this subject, students will be able to weightage
management, data structures for solving computational problems. (R,U,A -
Cognitive level)
CO-5 Demonstrate the basic concepts of procedural programming using functions, 15
structures, and files in writing efficient and maintainable programs. (R,U,A -
Cognitive level)
CO-6 Integrate and examine object oriented programming concepts and various 10
libraries in Python. (R,U,A - Cognitive level)

Mapping with POs:


PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3

CO-1 3 2 3 2 3 1 1 3 3 2 1 3

CO-2 2 2 2 1 2 2 1 3 3 2 1 3

CO-3 2 2 3 1 2 2 2 3 3 2 1 3

CO-4 2 2 3 1 2 2 2 3 3 2 1 3

CO-5 2 2 2 1 2 2 2 3 3 2 1 3

CO-6 3 2 3 2 3 3 3 3 3 2 1 3

Rationale* 14 12 16 8 14 12 11 18 18 12 6 18

*Rationale: Explaining why it is matching this particular program outcome

LIST OF PRACTICALS:

1. Write a program that performs as calculator (addition, multiplication, division, subtraction).


2. Write a program to find area of triangle (a=h*b*.5) where a = area, h = height, b = base.
3. Write a program to calculate simple interest (i = (p*r*n)/100) where i = Simple interest, p =
Principal amount, r = Rate of interest, n = Number of years.
4. Write a program to interchange two numbers.

43
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

5. Write a program to enter a distance into kilometer and convert it in to meter, feet, inches and
centimeter. Hint: 1 Kilometer = 3280.8399 Feet, 1 kilometer = in x 0.0000254, centimeters =
kilometers × 100000
6. Write a program to compute Fahrenheit from centigrade (f=1.8*c +32)
7. Write a program to find out distance travelled by a vehicle for time (t) with equation d = ut + at 2
where u= velocity and a=acceleration.
8. Write a program to find that the accepted number is Negative, or Positive or Zero.
9. Write a program to read marks for a single subject of a student. If marks < 36, output the result

10. Write a program to read three numbers from keyboard and find out maximum out of these three.
(nested if else)
11. Write a program to check whether the entered character is capital, small letter, digit or any
special character.
12. Write a program to read marks from keyboard and your program should display equivalent
grade according to following table (if else ladder).
Marks Grade
100 - 80 Distinction
79 - 60 First Class
59 - 40 Second Class
< 40 Fail
13. Write a program to prepare pay slip using following data.
Da = 10% of basic, Hra = 7.50% of basic, Ma = 300,
Pf = 12.50% of basic, Gross = basic + Da + Hra + Ma, Nt = Gross Pf.
14. Write a program to read no 1 to 7 and print relatively day Sunday to Saturday.
15. Write a menu-driven program for scientific calculator using switch-case statement. (add, sub,
mul, div, module, square, square root, power, log)
16. Write a program to print sum of first n integer numbers.
17. Write a program to check the entered character is vowel or not. (using switch...case)
18. Write a program to find out the Maximum and Minimum number from given 10 numbers using
for, while loop.
19. Write a program to input an integer number and check the last digit of number is even or odd
using any looping structure.
20. Write a program to print sum of individual digits of a given integer using while statement. (Use
% operator)
21. Write a program to find out sum of first and last digit of a given number.

44
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

22. Write a program to check whether the given number is prime or not.
23. Write a program to print first n prime numbers.
24. Write a program to find factorial of a given number.
25. Write a program to generate first n number of Fibonacci series.
26. Write a program that accept a string and count the number of space character, tab character,
new line character, and any other characters.
(Hint: use getchar() to accept characters. Use combination of switch..case and while loop).
27. Write a program to find the sum and average of different numbers. The user sould be able to
enter as many numbers as he wants.
28. Write a program to accept start number and end number from the user and print all the numbers
in the range.
29. Write a program to calculate average and total marks of 5 students for 3 subjects (use nested for
loops).
30. Read five persons height and weight and count the number of person having height greater than
170 and weight less than 50,
31. Write
32. Write a program to find 1+1/2+1/3+1/4+....+1/n.
33. Write a program to find 1+1/2!+1/3!+1/4!+.....+1/n!.
34. Write a program to evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9!.
35. Write a program to print following patterns:
1) 2) 3)
* * *****
** * * ****
*** * * * ***
**** * * * * * **
***** *
36. Write a program to print following patterns:
1) 2) 3) 4)
1 12345 55555 1
12 1234 4444 22
123 123 333 333
1234 12 22 4444
12345 1 1 55555
37. Write a program to print following patterns:
1) 2) 3) 4)
1 1 * 1
123 1 1 *#* 12
12345 1 2 1 *###* 123
45
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

1234567 1 3 3 1 *#####* 1234


123456789 1 4 6 4 1 * # # # # # # #* 123
12
1
38. Write a program to print following patterns:
1) 2)
A AAAAA
AB BBBB
ABC CCC
ABCD DD
ABCDE E
39. Write a program to find out which number is even or odd from list of 10 numbers using an
array.
40. Write a program to read and store the roll no and marks of 20 students using two-dimensional
array.
41. Write a program to sort given array in ascending order. (Use Selection sort).
42. Write a program to replace a character, to delete a character in a given string.
43. Write a program to reverse string.
44. Write a program that defines a function to check whether a given number is prime or not.
45. Write a program to find factorial of a number using recursion.
46. Define a structure data type called time_struct containing three - integer hour, integer
minute and integer second. Develop a program that would assign values to the individual
number and display the time in the format: (16: 40: 51).
47.
this structure, write a program to read personal information of 5 people and print the same on
screen.
48. the following information:
Player name, Team name, Batting average

information about all the 5 players and print team wise list containing names of players with
their batting average.
49. Write a program to swap two values using pointers.
50. Write a program for sorting using pointer.

Practical List for Python Programming


51. To display the sum of two numbers.
52. Calculate area of circle.
46
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

53. Accept a number from keyboard and test whether the given number is even or odd.
54. To display numbers from 1 to 10 using while loop.
55. To display even numbers between X and Y.
56. To display the elements of a list using for loop.
57. Draw following patterns using nested loops.
* 1 * 1
** 12 * * 2 2
*** 123 * * * 3 3 3
58. Write a Python function to swap two numbers.
59. Write a Python function to find the greatest of 3 numbers.
60. Write a Python function to find the roots of a quadratic equation.
61. Write a Python function to evaluate factorial function using while loop.
62. Write a Python function to test whether a given number is prime or not.
63. Write a Python function to generate Fibonacci series till given number.
64. A python program that helps to know the effects of slicing operations on an array.
65. A python program to sort the array elements using bubble sort technique.
66. A python program to search for the position of an element in an array using index () method.
67. A python program to accept two matrices and find their product.
68. A python program to find the number of words in a string.
69. A python program to insert a sub string in a string in a particular position.
70. A python program to know how many times an element occurred in the list.
71. A python program to sort a tuple with nested tuples.
72. A python program to convert the elements of two lists into key-value pairs of a dictionary.
73. A python program to create a Bank class where deposits and withdrawals can be handled by
using instance methods.
74. A python program to implement multiple inheritance using two base classes.
75. A python program to overload greater than (>) operator to make it act on class objects.
76. A python program to show method overloading to find sum of two or three numbers.
77. A python program to call super class constructor in the sub class using super ().
78. Demonstrate use of GPIO library.
79. Explore various uses of numpy.
80. Demonstrate use of matplotlib, pandas.

Major Equipment: Computer System

47
Approved Version from the Academic Year 2021-22
Sarvajanik University
Sarvajanik College of Engineering & Technology,
Surat
Bachelor of Technology (B. Tech.)

List of Open Source/learning website:


http://ps-iiith.vlabs.ac.in/
https://nptel.ac.in/courses/106/104/106104128/
o Introduction to Programming in C.
https://nptel.ac.in/courses/106/106/106106145/
o Programming Data Structure and Algorithms using Python.
https://nptel.ac.in/courses/106/106/106106182/
o Computing using Python
https://www.coursera.org/
https://www.udemy.com/
https://www.udacity.com/

List of Open Source Software:


1. Geany editor
2. Codeblocks editor
3. Gcc compiler
4. Anaconda
5. Pycharm

48
Approved Version from the Academic Year 2021-22

You might also like