Introduction to Programming Previous Paper 2023  


0

Khyber PakhtunKhwa Board of Technical & Commerce Education Peshawar
Diploma in Information Technology
(Part — I) New Course
2nd Term Examination 2023
Paper: – Introduction to Programming

Time allowed: 2 Hours &  40 minutes

Marks: 60

(Part-B)

Q2: – Attempt any Six questions from the following. All questions carry equal (05) marks.    (30) 

i. Write a short note on advantages of Python.

ii. Write a script that will carry every elements of the list into its cube. Number = [2,5,3,6,7]

iii. Write any two types of programming errors in python

iv. Write a script in Python to draw a square using turtle library.

v. Differentiate between append and insert method of a list.

vi. Define string. Write a script to use built in method upper( ) and lower( ).

vii. Write a script to print first 10 natural number using for loop.

viii. Write a Python function that accept two numbers as arguments and returns the sum.

(Part – C)

Note: Attempt any Three questions from the following. All questions carry equal (10) marks.  (30) 

Q.3:- Why we use functions in Python? Write a Python function to find the factorial of a number.

Q.4:- Why we use turtle library in Python? Write a python script to thaw rectangle on screen.

Q.5:- What is If-else statement in Python? Write a python script to find the number divisible by 5 or not.

Q.6:- Write note on any two of the following.

a. Numpy
b. Matplotlib
c. Panda
d. Django

Leave a Reply

Your email address will not be published. Required fields are marked *


Copyright © 2024 Basics of Computer