Sunday, 19 March 2023
Here are 50 common Python interview programs:
In this post, we have given the interview questions at the very beginner level.
Write a program to print "Hello, World!".
Write a program to swap two variables.
Write a program to find the largest number among three numbers.
Write a program to check whether a number is even or odd.
Write a program to find the sum of natural numbers up to a given number.
Write a program to find the factorial of a number.
Write a program to check whether a given string is a palindrome or not.
Write a program to count the number of vowels in a given string.
Write a program to reverse a string.
Write a program to check whether a given number is a prime number or not.
Write a program to find the Fibonacci series up to a given number.
Write a program to find the GCD of two numbers.
Write a program to find the LCM of two numbers.
Write a program to convert Celsius to Fahrenheit.
Write a program to convert Fahrenheit to Celsius.
Write a program to find the roots of a quadratic equation.
Write a program to find the area of a circle.
Write a program to find the area of a triangle.
Write a program to find the perimeter of a rectangle.
Write a program to find the perimeter of a square.
Write a program to find the area of a rectangle.
Write a program to find the area of a square.
Write a program to find the sum of digits of a given number.
Write a program to find the number of digits in a given number.
Write a program to check whether a given number is a palindrome or not.
Write a program to find the ASCII value of a character.
Write a program to find the HCF of two numbers.
Write a program to find the sum of the digits of a given number until the sum becomes a single digit.
Write a program to find the sum of even and odd numbers in a given list.
Write a program to find the maximum and minimum elements in a given list.
Write a program to remove duplicates from a given list.
Write a program to sort a given list in ascending and descending order.
Write a program to find the second largest element in a given list.
Write a program to find the second smallest element in a given list.
Write a program to reverse a given list.
Write a program to find the sum of all numbers in a given list.
Write a program to find the average of all numbers in a given list.
Write a program to find the median of all numbers in a given list.
Write a program to find the mode of all numbers in a given list.
Write a program to find the frequency of each element in a given list.
Write a program to find the common elements between two given lists.
Write a program to merge two given lists and remove duplicates.
Write a program to count the number of occurrences of a given element in a given list.
Write a program to find the intersection of two given lists.
Write a program to find the union of two given lists.
Write a program to find the difference between two given lists.
Write a program to remove the nth element from a given list.
Write a program to find the sum of elements in the diagonal of a matrix.
Write a program to find the transpose of a matrix.
Write a program to multiply two matrices.
Sunday, 17 July 2022
What is Data Science? - End to End project - part 1
2. Data Collection
3. Data Analysis
4. Machine Learning Model
5. Insights
Saturday, 16 July 2022
What is Data Science?
Data Science is a combination of multiple disciplines that use statistics, data analysis and machine learning to analyze data and extract knowledge and insights from it.
What is the Use of Data Science?
Data Science is the art of providing insights based on the provided data from the client or data collected based on the business requirement.
Data Science is a field that has gained significant attention in recent years, thanks to the increasing importance of data-driven decision making. In simple terms, Data Science is the process of extracting insights and knowledge from large and complex data sets.
The field of Data Science is interdisciplinary and draws on concepts from computer science, statistics, mathematics, and other related fields. It involves a combination of data collection, cleaning, processing, analysis, and visualization, with the ultimate goal of extracting meaningful insights that can be used to inform business decisions.
One of the key benefits of Data Science is that it allows organizations to gain a deeper understanding of their customers, operations, and overall performance. By analyzing data, businesses can identify trends, patterns, and areas for improvement, which can ultimately lead to increased efficiency, profitability, and customer satisfaction.
Data Science is also a rapidly growing field, with high demand for skilled professionals who can work with large and complex data sets. In fact, according to the U.S. Bureau of Labor Statistics, employment of computer and information research scientists (which includes Data Scientists) is projected to grow 19 percent from 2020 to 2030, much faster than the average for all occupations.
If you're interested in pursuing a career in Data Science, there are a variety of educational and training programs available, ranging from online courses to degree programs. Many of these programs focus on developing skills in areas such as data analysis, machine learning, and programming.
In conclusion, Data Science is an exciting and rapidly growing field that offers numerous opportunities for skilled professionals. By leveraging the power of data, businesses can gain valuable insights that can help them make better decisions and achieve greater success. If you're interested in pursuing a career in Data Science, there are a variety of resources available to help you get started.
That Insight will be the output of a data science project where it will help us to make any of the below.
1. Decision Making
2. Prediction
3. Pattern recognition
these things will help us to make better decisions on business plans, products to be launched, prioritising the priority work, and strategies that will make more revenues.
This is why companies invest a lot in data science.
In the upcoming post, we will learn about How an End to End data science project will be, and what are the opportunities in this domain.
Thursday, 17 February 2022
Python practice programs for beginners - Day 20
Day 19 Solution:
Output:
Practice the same kind of programs and if you practice any new program kindly mention in it in comments.
Also read: How to install Android Studio
Python practice programs for beginners - Day 19
Day 18: Solution
Day 19: Getting list items from users at run time and printing it.
You can practice the above program.
Day 19 Task: Get the Hollywood movie list going to get released in 2022 Summer from the user and print it.
Python practice programs for beginners - Day 18
Day 17 Solution:
Monday, 14 February 2022
Python practice programs for beginners - Day 17
Day 16: Solution
Day 17: While loop
Syntax:
while condition to check:
statement to be executed
Example:
Day 17 Task:
Get a number from the user and print the odd numbers in that range.
Saturday, 12 February 2022
Python practice programs for beginners - Day 16
Day 15 Solution:
Friday, 11 February 2022
Python practice programs for beginners - Day 15
Thursday, 10 February 2022
Python practice programs for beginners - Day 14
Day 13 Solution:
Python Grade Checker Project Source Code:
Day 14: for loop
Syntax:
for val in sequence:
statements to be expected in the loop
val - variables
sequence - may be a range or list of items
Example:
Output:Task: Print your name 10 times
Wednesday, 9 February 2022
Python practice programs for beginners - Day 13
Day 12 Solution:
Get a student details such as:
Name:
School/College:
City:
Subject 1 mark :
to
Subject 5 mark:
Then calculate the following details and display them:
Total:
Average:
Pass/Fail:
Grade:
Grade Calculation based on Average value:
91 to 100 - A+
86 - 90 - A
80 - 85 - B+
79 - 84 - B
70 - 78 - C
60 - 69 - D
50 - 58 - E
Below 50 - F
Sample Output:
Will see the solution in the next post.
Tuesday, 8 February 2022
Python practice programs for beginners - Day 12
Day 11 solution:
We can use
f --> format
' --> single apostrophe used to say that it follows String formatting.
{} --> we can use the curly braces for the placeholders where we can mention the variable name.
Monday, 7 February 2022
Python practice programs for beginners - Day 11
Day 10 Solution:
Day 11: If elif
If we want to check more scenarios we can use if elif
Syntax:
if condition 1:
Statement to be executed if the condition is True
elif condition 2:
Statement to be executed if the condition is True
elif condition 3:
Statement to be executed if the condition is True
Day 11 Task: Get three numbers from the user and try to find the smallest of those three numbers.
Python practice programs for beginners - Day 10
Day 9 Solution:
Day 10: If-Else statement
In the above, we have used two if statements but we can reduce the number of lines of code by using an else statement.
You can see the number of lines of code decreased.
The If else get applied in many scenarios.
Day 10 Task:
Get a number from the user and find whether the given number is an odd number or an even number.
Python practice programs for beginners - Day9
Day 8 solution:
Python practice programs for beginners - Day8
Day 7 Solutions:
and Operator:
Example:
a=10
b=10
c=10
a==b and a==c --> True
(True) and (True) --> True
a=11
b=10
c=10
a==b and a==c --> False
(False) and (True) --> False
or Operator:
a=11
b=10
c=10
a==b and a==c --> False
(False) and (True) --> True
not Operator:
not(b==c)
not(True) --> False
Task: Try to use these operators and check various conditions.