0% found this document useful (0 votes)
4 views2 pages

Formatted Python Assignment

This document outlines an assignment for a programming course focusing on Python functions, divided into three parts: concept and analysis, intermediate programming, and advanced programming. It includes questions on local vs global variables, function outputs, and various programming tasks such as finding the largest number in a list and generating a Fibonacci series. The assignment also includes instructions for logic demonstration, sample input/output, and proper coding practices.

Uploaded by

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

Formatted Python Assignment

This document outlines an assignment for a programming course focusing on Python functions, divided into three parts: concept and analysis, intermediate programming, and advanced programming. It includes questions on local vs global variables, function outputs, and various programming tasks such as finding the largest number in a list and generating a Fibonacci series. The assignment also includes instructions for logic demonstration, sample input/output, and proper coding practices.

Uploaded by

sanjolibatra0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PYTHON FUNCTIONS ASSIGNMENT

Course: Basics of Programming

Unit: Functions

Marks: 35

Name: ____________________

Roll No.: ____________________

Class: ____________________

Date: ____________________
Part A: Concept + Analysis (10 Marks)

Q1. Explain the difference between Local and Global variables, and functions with return vs
without return (with examples).

Q2. Trace the output:

def func(x):
x = x + 10
return x

a=5
print(func(a))
print(a)

Q3. Explain default and keyword arguments with examples.

Part B: Intermediate Programming (10 Marks)

Q4. Function to find largest and smallest number in a list.

Q5. Function to count even and odd numbers in a list.

Q6. Function to count vowels and consonants in a string.

Part C: Advanced Programming (15 Marks)

Q7. Function to check palindrome number.

Q8. Function to find sum of digits (without built-in functions).

Q9. Function to generate Fibonacci series.

Bonus

Check palindrome string without slicing.

Instructions

- Show logic and sample input/output

- Maintain proper indentation

- Avoid shortcuts where not allowed

You might also like