Skip to main content

Command Palette

Search for a command to run...

Basics of Python-15

Published
4 min read
Basics of Python-15
P

Hello, I'm Priya Chakraborty, a dedicated B.Tech student in Electrical Engineering at Siliguri Institute Of Technology. I'm an enthusiastic learner, constantly seeking to expand my skill set and knowledge base. With a solid foundation in programming languages such as C, R, Python, and MySQL, I'm poised to tackle complex technical challenges.

But my passions extend beyond the realm of engineering. I'm also an aspiring content writer, driven by a curiosity to communicate ideas, both technical and non-technical, in a way that captivates and educates.

My journey is defined by a relentless pursuit of self-improvement, coupled with strong communication skills. I believe in the power of continuous learning and the importance of sharing knowledge.

Day -15

So far, I have discussed the basics of python.

In my blogs, I have tried to cover all the basics concept of python.

  1. Basics of Python - Print Statement

  2. Basics of Python-2 - Data Types

  3. Basics of Python-3 - Conditional Statement

  4. Basics of Python-4 - List

  5. Basics of Python-5 -String

  6. Basics of Python-6 - Tuple

  7. Basics of Python-7 - Set

  8. Basics of Python-8 - Dictionary

  9. Basics of Python-9 - Loops

  10. Basics of Python-10 -For loop

  11. Basics of Python-11 - Pattern Printing

  12. Basics of Python-12 - While Loop

  13. Basics of Python-13 -Function

  14. Basics of Python-14 - OOPs Concept

These are the most common python questions for basics :

  1. Write a program to print "Hello, World!" on the console.

  2. Write a program to prompt the user for their name and then print a greeting using their name.

  3. Write a program to calculate the sum of two numbers input by the user.

  4. Write a program to calculate the factorial of a number input by the user.

  5. Write a program to check if a number input by the user is even or odd.

  6. Write a program to check if a number input by the user is positive, negative, or zero.

  7. Write a program to check if a given string is a palindrome or not.

  8. Write a program to find the largest of three numbers input by the user.

  9. Write a program to find the smallest of three numbers input by the user.

  10. Write a program to calculate the average of three numbers input by the user.

  11. Write a program to swap two variables without using a third variable.

  12. Write a program to print the first 10 Fibonacci numbers.

  13. Write a program to print the multiplication table of a number input by the user.

  14. Write a program to check if a number is prime or not.

  15. Write a program to find the factorial of a number using recursion.

  16. Write a program to find the sum of the digits of a number.

  17. Write a program to find the reverse of a number.

  18. Write a program to count the number of vowels in a given string.

  19. Write a program to count the number of words in a given string.

  20. Write a program to find the length of the longest word in a given sentence.

  21. Write a program to check if a given number is a palindrome or not.

  22. Write a program to find the sum of the first n natural numbers.

  23. Write a program to find the sum of the digits of a number using recursion.

  24. Write a program to find the largest element in an array.

  25. Write a program to find the second largest element in an array.

  26. Write a program to find the smallest element in an array.

  27. Write a program to find the second smallest element in an array.

  28. Write a program to sort an array in ascending order.

  29. Write a program to sort an array in descending order.

  30. Write a program to reverse an array.

  31. Write a program to remove duplicates from an array.

  32. Write a program to check if two strings are anagrams or not.

  33. Write a program to find the common elements in two arrays.

  34. Write a program to find the difference between two arrays.

  35. Write a program to merge two arrays.

  36. Write a program to find the frequency of each element in an array.

  37. Write a program to find the missing number in an array of integers.

  38. Write a program to find the maximum subarray sum in an array.

  39. Write a program to find the first non-repeating character in a string.

  40. Write a program to check if a given string contains only digits.

  41. Write a program to check if a given string contains only alphabets.

  42. Write a program to find the ASCII value of a character.

  43. Write a program to convert a decimal number to binary.

  44. Write a program to convert a decimal number to an octal.

  45. Write a program to convert a decimal number to hexadecimal.

  46. Write a program to convert a binary number to a decimal.

  47. Write a program to convert a binary number to an octal.

  48. Write a program to convert a binary number to hexadecimal.

  49. Write a program to convert an octal number to a decimal.

That's all for the Basics of Python. Here I am ending Basics of Python (day 1 to day 15) Blogs.

Happy Learning :)

More from this blog

Priya's blog

46 posts

Python Developer@Codeclause Mentee @Trailhead Salesforce Content Executive @GDSC SIT'22-23 Google Women Techmakers Ambassador @Google WTM Coreteam @ GirlScript Kolkata