Internal exam phase-1 - ( 01-oct- 2024 )
[Link] Data types---> int,float,boolean,complex
[Link] words in python---> All 33 keywords
[Link] ---> arithmetic ,logical, comparision, assignment
[Link] Data types--->string,list,tuple,dictionary,set(methods in each data type)
[Link] statements ---> if, elif, else
[Link]---> while, for
[Link]---> python functions(def fun() and lambda)
[Link] : break,continue,pass
Note: More focus on 4 to 8 topics ( programming topics )
===============================================********************================
==================================
Programs:
[Link] a Python program to check if a given number is even or odd using a
function.
[Link] Python program swapping of two numbers using third variable
[Link] a Python program that takes a list of numbers get only 4 multiples (O/P -->
lst = [3,34,12,45,64,78,100],o/p---->result = [12,64,100])
.
[Link] a Python program that uses a while loop to print the numbers from 10 to 20.
[Link] a Python program to check whether a number is prime or not.
[Link] a program to find the largest element in a list(Don't use inbuilt
function).
[Link] a Python program to check if a string is a palindrome or not.
[Link] a Python function that takes a list of numbers and returns average of all
numbers in the list(Don't use inbuilt functions).
[Link] a Python program to print the Fibonacci sequence up to a given number n.
[Link] a Python function to calculate the factorial of a number
[Link] the sentence "aaacce", create a dictionary that shows the frequency of
each word.
Output: {'a': 3, 'c': 2, 'c': 1}.
12. Given the list numbers = [1, 2, 2, 3, 4, 4, 5], remove duplicates while
maintaining the order of elements and print the updated list.