0% found this document useful (0 votes)
2 views4 pages

Unit1 Full Questions Python

The document contains a series of questions and programming tasks related to Python, covering topics such as data types, control statements, functions, and mathematical operations. It includes specific programming assignments like generating Fibonacci series, reversing strings, and implementing games. The questions are structured for different examination periods, providing a comprehensive overview of Python programming concepts.

Uploaded by

1si25cs252
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)
2 views4 pages

Unit1 Full Questions Python

The document contains a series of questions and programming tasks related to Python, covering topics such as data types, control statements, functions, and mathematical operations. It includes specific programming assignments like generating Fibonacci series, reversing strings, and implementing games. The questions are structured for different examination periods, providing a comprehensive overview of Python programming concepts.

Uploaded by

1si25cs252
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

UNIT 1 FULL QUESTIONS (WITH OR)

1. Sept 2024 Supplementary

Q1:

a) Illustrate the following concepts with an example:

(i) Getting the input from the terminal

(ii) Type casting

(iii) Creating the string

b) Develop the Python program to compute the Fibonacci Series.

c) Develop a menu driven program to perform Basic Arithmetic Operations using Python.

OR

Q2:

a) Write a Python program using “Nested If” concept to generate the pattern:

**

***

****

b) Develop the Python program using functions to reverse the given string.

String: Tumkur

Expected output: rukmuT

c) What is a variable? List any five rules for declaring variables.

2. Sept 2023

Q1:

a) Explain the different standard data types used in Python programming language with examples.

b) Illustrate string concatenation and replication with an example for each.

c) Write Python programs for the following:

(i) To convert degrees Fahrenheit to degree Celsius

(ii) To find the factorial of a number

OR
Q2:

a) Differentiate between break and continue statements in Python programming language.

b) Explain if/else statement with its general form and flowchart.

c) What are nested loops? Write a Python program to display all the permutations of a three letter
word.

3. Sept 2024 (Intro)

Q1:

a) Explain the structure of user defined function in Python. Illustrate the same with respect to a
function to add two numbers.

b) Develop a Python program to print all prime numbers within a given range.

OR

Q2:

a) Explain any two flow control statements in Python with an example for each.

b) Define a function “fact()” to find factorial of a number. Develop a Python program using the
defined function.

4. July-Aug 2024

Q1:

a) Explain ‘while’ control statement with a general syntax and flowchart. Give two practical
scenarios.

b) Describe comparison operator and Boolean operator with examples.

c) Develop a Python program to implement a game ‘guess the number’ using function concept.

OR

Q2:

a) Explain ‘elif’ control statement with syntax and flowchart.

b) Develop a Python program to reverse a given integer.

c) What are the advantages of functions? Develop a program to find area of triangle and circle.

5. July-Aug 2024 (Intro)


Q1:

a) Summarize various math operators from highest to lowest precedence with examples.

b) Show with suitable example how str(), int(), and float() functions are used for type conversion.

c) Develop a program to read the name and year of birth of a person and display whether the
person is a senior citizen or not.

OR

Q2:

a) Show with suitable examples:

(i) Comparison operators

(ii) Mixing Boolean and comparison operators

b) Write with flow diagram:

(i) if statement

(ii) elif statement

c) Write a program to calculate factorial using functions.

6. Aug-Sept 2024

Q1:

a) Differentiate between different standard data types used in Python programming language with
examples.

b) Summarize the precedence of mathematical operators in Python and illustrate with an example.

c) Develop a Python program that prints numbers from 1 to 10 using ‘for’ loop and ‘while’ loop.

d) With syntax, explain import statement in Python.

OR

Q2:

a) Discuss different types of flow control statements with examples.

b) Develop a Python program that prints ‘Hello’ if 1 is stored in spam, ‘Howdy’ if 2 is stored, else
‘Greetings!’.

c) Develop a Python program that asks for name and password using break and continue.

7. March 2024
Q1:

a) Discuss multiple elif statement with flowchart and syntax.

b) Develop a Python program to calculate area of triangle.

c) How is continue different from break? Explain with example.

OR

Q2:

a) Develop a Python program to find sum of natural numbers.

b) What are advantages of functions? Develop a program to find largest of two numbers.

c) Explain the stepping argument in range() function with example.

8. April-May 2023

Q1:

a) Illustrate the usage of str(), int() and float() functions with examples.

b) Write a program to read name and age and display whether the person is a senior citizen using if
and elif.

c) Differentiate between local and global variables with examples.

OR

Q2:

a) Summarize differences between break and continue statements.

b) Explain how for loop along with range() works with example.

c) What is exception handling? Write a Python program to handle zero division error.

You might also like