Gujarat Technological UniversitySummer 2026 examination

GTU 3151108 Python Programming Summer 2026 Question Paper & PDF

B.E. · EC Engineering · Semester 5 · Subject code 3151108
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 2:30 PM – 5:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

10 of 25 questions on this paper were also asked in other years. 2 more are types of question GTU sets again with new data. Each is marked below with the years it appeared.See all 15 repeated 3151108 questions, most asked first

Q.1

14 Marks
(a)
3 marks
Describe logical operator and identity operator with example.
(b)
4 marks
Discuss the following function of List in python.
aappend( )
binsert( )
csort( )
dremove( )
(c)
7 marksAsked in 4 of 4 papers
Differentiate between List and Tuple in Python. Write advantages of tuple.

Also asked in Winter 2025 Q1c, Summer 2025 Q4b, Summer 2024 Q1a

Q.2

14 Marks
(a)
3 marksAsked in 2 of 4 papers
Explain the structure of for loop in python with suitable example.

Also asked in Summer 2024 Q3a

(b)
4 marks
Describe elif ladder structure and nested if..else.. statement.
(c)
7 marksAsked in 2 of 4 papers
Write a Python function to calculate the factorial of a number (a non-negative integer).

Also asked in Summer 2024 Q3b OR

(c)
7 marksSame type asked in 2 of 4 papers
Write a Python program to construct the following pattern using a nested for loop.

Also asked in Summer 2024 Q3b

Q.3

14 Marks
(a)
3 marks
What is meant by module in python? List some built in modules in python.
(b)
4 marksAsked in 2 of 4 papers
Describe dictionary in python with suitable example.

Also asked in Summer 2024 Q2a

(c)
7 marks
What is an exception? Explain about the different types of Exceptions in Python.
(a)
3 marks
What are negative indexes and why are they used?
(b)
4 marksAsked in 2 of 4 papers
Describe break, continue, pass statement with example.

Also asked in Summer 2024 Q3c OR

(c)
7 marks

Write a Python function that takes a number entered by user and checks whether the number is prime or not.

Q.4

14 Marks
(a)
3 marks

Write a python program to display current year, month and day separately using datetime module.

(b)
4 marksAsked in 3 of 4 papers
List and give brief explanation of different modes for opening a file in Python.

Also asked in Summer 2025 Q5b OR, Summer 2024 Q5a OR

(c)
7 marks
Write a Python program to copy the contents of a one .txt file to another .txt file.
(a)
3 marks
Enlist various IDE available to program MicroPython program.
(b)
4 marks
Describe try-except block with suitable example.
(c)
7 marksAsked in 2 of 4 papers

With the help of suitable example explain how can we read and write to a CSV file in python?

Also asked in Winter 2025 Q5c

Q.5

14 Marks
(a)
3 marksAsked in 2 of 4 papers
What is micro python? Discuss unique features of micro python.

Also asked in Summer 2024 Q5a

(b)
4 marksSame type asked in 2 of 4 papers

Write a micropython program to blink led pin connected to GPIO digital pin 1 to 4 of ESP8266 continuously.

Also asked in Summer 2024 Q5b OR

(c)
7 marks

Write a micropython program to read and print DHT Sensor data for ESP8266 continuously.

(a)
3 marksAsked in 2 of 4 papers
Discus the steps of Installation of MicroPython on Hardware.

Also asked in Winter 2025 Q5a

(b)
4 marksAsked in 3 of 4 papers
Explain the difference between python and micro python.

Also asked in Winter 2025 Q5b OR, Summer 2025 Q5c

(c)
7 marks

Write MicroPython program to read proximity sensor connected at Pin1, blink the LED if sensing is detected.

More Python Programming papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper for Python Programming (Summer 2026, B.E. · EC Engineering, Sem 5). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

ViewDownload PDF