0% found this document useful (0 votes)
16 views14 pages

Python Programming Basics and Functions

The document discusses various Python programming concepts like data types, operators, conditional statements, loops, functions, modules and file handling. It includes examples of programs to perform operations on numbers, strings, lists, tuples, dictionaries, functions to calculate factors, powers, Fibonacci series and using Python modules.

Uploaded by

atishay jain
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)
16 views14 pages

Python Programming Basics and Functions

The document discusses various Python programming concepts like data types, operators, conditional statements, loops, functions, modules and file handling. It includes examples of programs to perform operations on numbers, strings, lists, tuples, dictionaries, functions to calculate factors, powers, Fibonacci series and using Python modules.

Uploaded by

atishay jain
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

ATISHAY JAIN 01113401921 BBA CAM 4

PYTHON PROGRAMMING
INTRODUCTION
ATISHAY JAIN 01113401921 BBA CAM 4

 Enter two numbers and perform swapping.

code

output

 Enter two numbers and perform the floor division.

Code

Output

 Enter no and perform bitwise operation.


I. AND

II. OR

III. XOR
ATISHAY JAIN 01113401921 BBA CAM 4

 Show the working of break and continue statement

 Input any number from user and check it is Even no. or not

 Write a program to calculate the nth term of Fibonacci series


ATISHAY JAIN 01113401921 BBA CAM 4

 Perform following with string

I. Slicing

II. Membership

III. Capitalize

IV. Lower and upper

V. Isdigit

VI. Split

VII. Startwith() and Endwith()


ATISHAY JAIN 01113401921 BBA CAM 4

Mutable and Immutable Object


ATISHAY JAIN 01113401921 BBA CAM 4

 Perform following with list

I. Append

II. Count

III. Remove

IV. Pop

V. Sort

VI. Reverse
ATISHAY JAIN 01113401921 BBA CAM 4

 Perform following with tuples

I. Count

II. Index

III. Len

IV. Min and max

V. +&*
ATISHAY JAIN 01113401921 BBA CAM 4

 Perform following with dictionary

I. Get

II. Update

III. Copy

IV. Delete

V. Clear

 Write a program to find sum of elements of List


ATISHAY JAIN 01113401921 BBA CAM 4

CONCEPT OF FUNCTION
ATISHAY JAIN 01113401921 BBA CAM 4

 Create parameterized function in python and show the basic functionality with function

 Enter a number and power then compute the power using an exponential operator.

 Input any number from user and calculate factorial of a number


ATISHAY JAIN 01113401921 BBA CAM 4

 Create function and perform Function argument

I. Required argument

II. Keyword argument

III. Default argument


ATISHAY JAIN 01113401921 BBA CAM 4

IV. Variable length or arbitrary argument

 Create Module and import module with basic functionality

1. Rename

2. From

3. Platform

4. Dir
ATISHAY JAIN 01113401921 BBA CAM 4

 Implement Math module (sqrt (), pi, ceil, floor, pow () )

 Implement Random module


ATISHAY JAIN 01113401921 BBA CAM 4

 Program to read and display file content.

You might also like