Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

Python Analytics interview questions 1-5

Python Analytics interview questions
In this series, we will add some of the basic questions to start with Python. Slowly we will move to moderate level DSA questions followed by Pandas, Numpy, and OS module.
All you need to do is to install Python in your system and start from scratch.

Python Analytics interview questions



We will try to solve each question in multiple ways, if you are missing out on the basics then do consult Tutorialspoint or w3school. Invest around 6 hours on these websites and you should be good to go

Python Analytics interview questions

Python Basic Question

1. Take input of two numbers from users and find out the maximum

a = input("Enter first number :")
b = input("Enter second number ")
if a>b:
print(a + " is greater than " + b)
else:
print(b + " is greater than "+a)

or

a = 30
b = 40
print(a if a>b else b)

or

a = 10
b = 30
c = max(a,b)
print(c)

2. Print the factorial of any number

a = 10
def fact(n):
if (n == 1 or n==0):
return 1
else:
return n*fact(n-1)
print(fact(5))

or

import math
print(math.factorial(5))
Python Analytics interview questions



3. Get square of the number if the number is odd and cube if even

def yoo(n):
if (n%2 == 0):
return nnn
else:
return n*n
print(yoo(3))
print(yoo(2))



4. Print square of first n natural numbers

x = int(input("Enter a natural number = "))
def sum_of_natural(x):
ss = 0
for i in range(1,x):
ss = ss+(i*i)
return ss
print("Sum of square of natural numbers are = " , sum_of_natural(x))
Python Analytics interview questions



5. Find if a number is an Armstrong number.

Example – 153 is an Armstrong number as 1^3+5^3+3^3 = 153

num = int(input("Enter a number = "))
s = 0
x = num
while (x >0 ):
digit = x%10
s = s+(digitdigitdigit)
x = x//10
print(s)
print("Armstrong" if s == num else "Not Armstrong")
Python Analytics interview questions


The Data Monk services

We are well known for our interview books and have 70+ e-book across Amazon and The Data Monk e-shop page . Following are best-seller combo packs and services that we are providing as of now

  1. YouTube channel covering all the interview-related important topics in SQL, Python, MS Excel, Machine Learning Algorithm, Statistics, and Direct Interview Questions
    Link – The Data Monk Youtube Channel
  2. Website – ~2000 completed solved Interview questions in SQL, Python, ML, and Case Study
    Link – The Data Monk website
  3. E-book shop – We have 70+ e-books available on our website and 3 bundles covering 2000+ solved interview questions. Do check it out
    Link – The Data E-shop Page
  4. Instagram Page – It covers only Most asked Questions and concepts (100+ posts). We have 100+ most asked interview topics explained in simple terms
    Link – The Data Monk Instagram page
  5. Mock Interviews/Career Guidance/Mentorship/Resume Making
    Book a slot on Top Mate

The Data Monk e-books

We know that each domain requires a different type of preparation, so we have divided our books in the same way:

1. 2200 Interview Questions to become Full Stack Analytics Professional – 2200 Most Asked Interview Questions
2.Data Scientist and Machine Learning Engineer -> 23 e-books covering all the ML Algorithms Interview Questions
3. 30 Days Analytics Course – Most Asked Interview Questions from 30 crucial topics

You can check out all the other e-books on our e-shop page – Do not miss it


For any information related to courses or e-books, please send an email to nitinkamal132@gmail.com

About TheDataMonkGrand Master

I am the Co-Founder of The Data Monk. I have a total of 6+ years of analytics experience 3+ years at Mu Sigma 2 years at OYO 1 year and counting at The Data Monk I am an active trader and a logically sarcastic idiot :)

Follow Me