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

Assignment Day 1

Uploaded by

satyampandey2719
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)
2 views2 pages

Assignment Day 1

Uploaded by

satyampandey2719
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
You are on page 1/ 2

SIP December 2024

Data Analysis and Visualisation Using Python Libraries


Day1-Assignment 1
Python Expressions
E1. Python Program to Find the Square Root without using Square-root function.
E2. Python Program to Calculate the Area of a Triangle where its three sides a, b, c are
given.
s=(a+b+c)/2
Area=square root of s(s-a)(s-b)(s-c)
E3. Python Program to Solve Quadratic Equation
E4. Python Program to Swap Two Variables
E5. Python Program to Convert Kilometers to Miles
E6. Python Program to Convert Celsius to Fahrenheit

Decision making
D1. Write a program to find greatest of three numbers.
D2. Write a program to find the grade of a student for marks out pf 100.
• Marks 85 and above - grade “A”
• Marks between 70 to 84, - grade “B”
• Marks between 55-69, -grade “C”
• Marks between 40-54, -grade “D”
• Marks below 40, - “fail”
D3. Find if given number is even or odd.
D4. Get input a number from user (maximum 4 digits) and decide whether number is a
single/double/triple/four digit number.

String
S1. Python program to check whether the string is Palindrome
S2. Reverse words in a given String in Python
S3. Python Program to identify in a strings the name, position and counting of vowels.
S4. Count the Number of matching characters in a pair of string
S5. Python program for removing i-th character from a string

List
Li1. Write a python program to find the sum of all numbers in a list.
Li2. Write a python program to find largest number in a given list without using max().
Li3. Write a python program to print all even numbers from a given list.
Li4. Write a python program to create a list of even numbers and another list of odd numbers
from a
given list.
Li5. Write a python program to remove repeated elements from a given list without using built-
in methods.
Li6. Write a python program to sort a given list of numbers without using sort() function.

Tuple
T1. Write a Python program to find the index of an item of a tuple.
T2. Write a Python program to find the length of a tuple.
T3. Write a Python program to reverse a tuple.
T4. Write a Python program to sort a list of tuple by its float element.
Sample data: [('item1', '12.20'), ('item2', '15.10'),
('item3', '24.5')]
Expected Output: [('item3', '24.5'), ('item2', '15.10'),
('item1', '12.20')]

Set
Se1. Write a Python program to create an intersection of sets.
Se2. Write a Python program to create a union of sets.
Se3. Write a Python program to create set difference.
Se4. Write a Python program to check if two given sets have no elements in common.
Se5. Write a Python program to remove the common element of a 2nd set from the 1st set

Loops
L1. Python Program to Find the Factorial of a Number
L2. Python Program to Display the multiplication Table
L3. Python Program to Print the Fibonacci sequence
L4. Python Program to Check Armstrong Number
L5. Python Program to Find the Sum of first 50 Natural Numbers

Function
F1. Write a Python function to print the even numbers from a given list. And call it.
F2. Write a Python function fact to calculate the factorial of a number. And call it to calculate
ncr=fact(n)/(fact(r)*fact(n-r))

You might also like