"hello" + "python" # concatenation'hellopython'
Sep-Dec 2025 batch, Vikrant Patil
Date: 22 Oct 2025
© Vikrant Patil
There is a text statement. I want to find out index of a word “is” from list of words made from this statement
text.split().index("is")
---->---->---->----->----->methods will get executed in this order
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[49], line 1 ----> 1 7 in statement TypeError: 'in <string>' requires string as left operand, not int
def say_hello(name, language):
if language == "marathi": # code block
print("नमस्कार", name)
elif language == "tamil":
print("வணக்கம் wewe", name)
elif language == "english":
print("hello", name)
elif language == "tamil":
print("வணக்கம்", name)
else:
print("Sorry", name, ", this language is not supported")
def say_hello1(name, language):
if language == "marathi": # code block
print("नमस्कार", name)
if language == "tamil":
print("வணக்கம் wewe", name)
if language == "english":
print("hello", name)
if language == "tamil":
print("வணக்கம்", name)
if language not in ["marathi", "english", "tamil"]:
print("Sorry", name, ", this language is not supported")
problem
max2 which takes two arguments x and y which are supposed to be numeric , it will return maximum number from x and y. Sample function call will look like this>>> max2(5, 4)
5
>>> max2(4, 5)
5
problem
Write a program which will print squares of first 10 natural numbers without creating a list
l
e
t
s
m
a
k
e
a
s
t
a
t
e
m
e
n
t
w
h
i
c
h
h
a
s
s
o
m
e
s
i
l
l
y
w
o
r
d
s
i
n
i
t
l,e,t,s, ,m,a,k,e, ,a, ,s,t,a,t,e,m,e,n,t, ,w,h,i,c,h, ,h,a,s, ,s,o,m,e, ,s,i,l,l,y, ,w,o,r,d,s, ,i,n, ,i,t,