Accenture coding
Accenture coding
# QUESTION_1:
divisior=int(input())
quotient=int(input())
reminder=int(input())
elements=[1000,200,235,789,10012]
# im having array element which contaion some dividends... you are suposed to
repturn the index of that element in the array..
dividend=divisior*quotient+reminder
if(dividend in elements):
print(elements.index(dividend))
# Question_2:
def permutate(n):
if(n<=1):
return 1
else:
return n*permutate(n-1)
# above function helps to find the number of Permutations for the given word
# iput:1
inp1=["hello","ccbc","aeiou"]
inp2=3
value=0
res=""
for i in inp1:
for char in i.lower():
if(char not in "aeiou"):
res=res+char
if(len(res))!=0:
value=max(value,permutate(len(res)))
print(value)
# Question_3:
def permutate(n):
if(n<=1):
return 1
else:
return n*permutate(n-1)
# above function helps to find the number of Permutations for the given word
# iput:1
inp1=["hello","ccbc","aeiou"]
inp2=3
value=0
res=""
for i in inp1:
for char in i.lower():
if(char not in "aeiou"):
res=res+char
if(len(res))!=0:
value=max(value,permutate(len(res)))
print(value)
# Question_4:
n=int(input())
arr=[100,120,132,156,72]
c=0
arr.sort()
for i in arr:
if(i%5==0):
c+=1
else:
if i<=n:
c-=1
n-=1
if(n<=0):
break
print(c)
# Question_5:
def whitespaces(a,b):
l1=[i for i in a if i==' ']
l2=[i for i in b if i==' ']
if abs(len(l1)-len(l2))%2==0:
return "even"
return "odd"
a=input()
b=input()
print(whitespaces(a,b))
# Question_6:'
# read all the 3 inputs
ip1=int(input())
ip2=int(input())
ip3=int(input())
buy=ip3-ip3//7
total=ip2*ip3
maximum=ip1*buy
if(maximum<total):
print(-1)
minimum=total//ip1
if(total%ip1!=0):
minimum+=1
print(minimum)