1. Write a program to swap two variables without using 3rd variable.
2. Reverse a string: "this is my book" expected output: "book my is this"
3. Create a list and a tuple and differentiate them.
4. "I am a Data Scientist".... expected output: "ataD"
5. Create a list of odd numbers between 11-30
6. Create 1D array using arange() and convert that 1D array to 3D array
7. Create an array with random numbers
8. Create a dictionary and convert that to a dataframe such that it has 4 rows and 2 columns
9. What is the difference between list and array and explain with example?
10. Create a function to find area of circle using return statement.
11. What is the difference between print and return statement?
12. Create a list which includes days in a week and extract "Thursday" and "Friday".
13.Write a code to generate 10 random integers between 1 to 100?
14. What is linspace and use the same to generate 10 random numbers between 1 to 50 and find
the step?
15. Write a code to print python 5 times?
16. What makes an abstarct method different from other methods?
17. Create a program to show multiple inheritance. Use classes and methods of your choice
18. Create 1D array of 25 numbers. Change it to a 2D array
19. Difference between extend, append and insert methods of list
20. Create a list of 5 colours. Using for loops, print each element of the list along with the individual
letters of the colour
21. Create a list of fruits and write a code to extract only the second letter of every fruit in the list
22. What method do we use to join two dataframes.
23. In histograms, what do bins refer to?
24. Which plot is best suited for studying the distribution of skewness and outlies of a dataset?
25. Create a dictionary, with 3 key value pairs. Add two more key value pairs using keys as index
value.
26. What are anonymous function. Name one anonymous fucntion with its syntax
27. Create a list of numbers and write a Python program to find the sum of all the numbers in the
list.
28. Create a dictionary that represents a person's contact information (name, email, phone number)
and print out the person's email.
29. Create a tuple of strings and write a Python program to count the number of occurrences of a
specific string in the tuple.
30. Write a Python program that checks whether a number is positive, negative, or zero.
31.Write a Python program that checks whether a given year is a leap year or not.
32. Write a Python program that determines the largest of three numbers using if-else statements.
33. Write a Python function to find the maximum of three numbers.
34. Write a Python function that takes a string as input and returns the reverse of the string.
35. Write a Python function that counts the number of vowels in a given string.
36. Use random package to generate 100 random float values and plot a histogram
37. Import the datetime package and use it to print the current date and time.
38. Write a Python function to count the number of occurence of unique characters in a given String
and sort in descending order.
39. Write a Python function to remove the duplicate elements from a string without using set
concept.
40. Write a Python function to find the total number of occurence of a substring in a given string.
41. Write a Program to accept 5 numbers from the user and display the largest and smallest number
using while loop.