N = int(raw_input().strip())
if N % 2 != 0:
print "Weird" @Coding_human
else:
if N >= 2 and N <= 5:
print "Not Weird"
elif N >= 6 and N <= 20:
print "Weird"
elif N > 20:
print "Not Weird"
Tg : @Coding_human
if N % 2 != 0:
print "Weird" @Coding_human
else:
if N >= 2 and N <= 5:
print "Not Weird"
elif N >= 6 and N <= 20:
print "Weird"
elif N > 20:
print "Not Weird"
Tg : @Coding_human
N = int(raw_input().strip())
if N % 2 != 0:
print "Weird" @Coding_human
else:
if N >= 2 and N <= 5:
print "Not Weird"
elif N >= 6 and N <= 20:
print "Weird"
elif N > 20:
print "Not Weird"
Accenture exam ans
@Coding_human
if N % 2 != 0:
print "Weird" @Coding_human
else:
if N >= 2 and N <= 5:
print "Not Weird"
elif N >= 6 and N <= 20:
print "Weird"
elif N > 20:
print "Not Weird"
Accenture exam ans
@Coding_human
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
set<int> s;
for(int i=0;i<=n;i++)
{
int x;
cin>>x;
s.insert(x);
}
cout<<s.size();
return 0;
}
Primes with a twist Code
🔗 Telegram: @Coding_human
🔔Unmute this channel to never miss any updates
using namespace std;
int main() {
int n;
cin>>n;
set<int> s;
for(int i=0;i<=n;i++)
{
int x;
cin>>x;
s.insert(x);
}
cout<<s.size();
return 0;
}
Primes with a twist Code
🔗 Telegram: @Coding_human
🔔Unmute this channel to never miss any updates
Numerical
1. 5.505
2.9.99hrs
3.2:5
4.6002
5.25
6.83.25
7. 70, 71
8. I and II but not III
9.only ll
10.820
11) 91
Telegram - @Coding_human
1. 5.505
2.9.99hrs
3.2:5
4.6002
5.25
6.83.25
7. 70, 71
8. I and II but not III
9.only ll
10.820
11) 91
Telegram - @Coding_human
def flip( ch):
return '1' if (ch == '0') else '0'
# Utility method to get minimum flips when
# alternate string starts with expected char
def getFlipWithStartingCharcter(str, expected):
flipCount = 0
for i in range(len( str)):
# if current character is not expected,
# increase flip count
if (str[i] != expected):
flipCount += 1
# flip expected character each time
expected = flip(expected)
return flipCount
# method return minimum flip to make binary
# string alternate
def minFlipToMakeStringAlternate(str):
# return minimum of following two
# 1) flips when alternate string starts with 0
# 2) flips when alternate string starts with 1
return min(getFlipWithStartingCharcter(str, '0'),
//allcoding1 getFlipWithStartingCharcter(str, '1'))
# Driver code to test above method
if name == "main":
str = "0001010111"
print(minFlipToMakeStringAlternate)
Python
✅Telegram- @Coding_human
@Coding_human
return '1' if (ch == '0') else '0'
# Utility method to get minimum flips when
# alternate string starts with expected char
def getFlipWithStartingCharcter(str, expected):
flipCount = 0
for i in range(len( str)):
# if current character is not expected,
# increase flip count
if (str[i] != expected):
flipCount += 1
# flip expected character each time
expected = flip(expected)
return flipCount
# method return minimum flip to make binary
# string alternate
def minFlipToMakeStringAlternate(str):
# return minimum of following two
# 1) flips when alternate string starts with 0
# 2) flips when alternate string starts with 1
return min(getFlipWithStartingCharcter(str, '0'),
//allcoding1 getFlipWithStartingCharcter(str, '1'))
# Driver code to test above method
if name == "main":
str = "0001010111"
print(minFlipToMakeStringAlternate)
Python
✅Telegram- @Coding_human
@Coding_human
@Coding_human
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
5)graph
C
125 per
6)percentage of accidents
B
35000
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
5)graph
C
125 per
6)percentage of accidents
B
35000
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
10)some pencil
Neither consluion
D
11)slipa
B
Is nessecary
Telegram @Coding_human
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
@Coding_human
5)graph
C
125 per
6)percentage of accidents
B
35000
https://t.me/DMAD_Discussion
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
10)some pencil
Neither consluion
D
11)slipa
B
Is necessary
Telegram @Coding_human
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
5)graph
C
125 per
6)percentage of accidents
B
35000
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
5)graph
C
125 per
6)percentage of accidents
B
35000
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
10)some pencil
Neither consluion
D
11)slipa
B
Is nessecary
Telegram @Coding_human
1)some bats
Only conclusion 1 folows
D
2)jitin at present
The data in both
A
3)some parks
Nethier consluion 1.
4)ram's brother.
The data in both satesment
@Coding_human
5)graph
C
125 per
6)percentage of accidents
B
35000
https://t.me/DMAD_Discussion
7)deperments
C
100
8)all men are strong
Neither consluion.
A
9)class 6th grpah
D
100
10)some pencil
Neither consluion
D
11)slipa
B
Is necessary
Telegram @Coding_human
for t in range(int(input())):
n=int(input())
i=1
s=0
while(s<n):
s=s+i*i
i=i+1
i=i-1
print(i)
Python
Healthy candies Code
Telegram - @Coding_human
@Coding_human
n=int(input())
i=1
s=0
while(s<n):
s=s+i*i
i=i+1
i=i-1
print(i)
Python
Healthy candies Code
Telegram - @Coding_human
@Coding_human
⭕ Programming Language Uses ⭕
Python:
1) Data Science
2) Machine Learning @Coding_human
3) Web Apps
4) Automation
5) Game Development
Telegram - @Coding_human
Python:
1) Data Science
2) Machine Learning @Coding_human
3) Web Apps
4) Automation
5) Game Development
Telegram - @Coding_human
VIRTUSA & REVATURE EXAM SOLUTION GROUP:
@Coding_human
https://t.me/virtusa_revature_all_slots_code
✅ Share post in ur college Whatsapp grps.
@Coding_human
https://t.me/virtusa_revature_all_slots_code
✅ Share post in ur college Whatsapp grps.
⚡NPCI Interview Experience - 2022 ⚡
1) Introduce Yourself
2) Write a program to find second
highest in array.
3) Explain the code.
4) Time Complexity of written code
5) What is Github
6) Alternative of Github
7) Explain the project(mentioned in
resume)
8) Any Questions you want to ask.
Telegram - @Coding_human
@Coding_human
1) Introduce Yourself
2) Write a program to find second
highest in array.
3) Explain the code.
4) Time Complexity of written code
5) What is Github
6) Alternative of Github
7) Explain the project(mentioned in
resume)
8) Any Questions you want to ask.
Telegram - @Coding_human
@Coding_human
def replaceDigit(x, d1, d2):
result = 0
multiply = 1
while (x // 10 > 0):
# Take remainder of number
# starting from the unit
# place digit
remainder = x % 10
# check whether it is
# equal to the digit
# to be replaced.if yes
# then replace
if (remainder == d1):
result = (result + d2 *
multiply)
else: # else remain as such
result = (result + remainder *
multiply)
# Update and move forward
# from unit place to hundred @Coding_human
# place and so on.
multiply *= 10
x = int(x / 10) # update the value
# check whether it is equal to the digit
# to be replaced.if yes then replace
if (x == d1):
result = result + d2 * multiply
else: # else remain as such
result = result + x * multiply
return result
# Driver code
x = 645
d1 = 6
d2 = 5
print(replaceDigit(x, d1, d2))
Python
Replace single digit code
Telegram - @Coding_human
result = 0
multiply = 1
while (x // 10 > 0):
# Take remainder of number
# starting from the unit
# place digit
remainder = x % 10
# check whether it is
# equal to the digit
# to be replaced.if yes
# then replace
if (remainder == d1):
result = (result + d2 *
multiply)
else: # else remain as such
result = (result + remainder *
multiply)
# Update and move forward
# from unit place to hundred @Coding_human
# place and so on.
multiply *= 10
x = int(x / 10) # update the value
# check whether it is equal to the digit
# to be replaced.if yes then replace
if (x == d1):
result = result + d2 * multiply
else: # else remain as such
result = result + x * multiply
return result
# Driver code
x = 645
d1 = 6
d2 = 5
print(replaceDigit(x, d1, d2))
Python
Replace single digit code
Telegram - @Coding_human
WIPRO & VIRTUSA EXAM SOLUTION GROUP:
@Coding_human
https://t.me/virtusa_wipro_all_slots_code
✅ Share post in ur college Whatsapp grps.
@Coding_human
https://t.me/virtusa_wipro_all_slots_code
✅ Share post in ur college Whatsapp grps.
📌Tech Mahindra Interview Experience
1) Asked my I'd card
2) Self intro
3) mentioned basics of Java
So he asked basics
4) Data types
5) Inheritance
6) Polymorphism
7) Exception
8) Are u willing to relocate
9) Are u comfortable with any
shifts
10) Are u interested in learning new
language
Telegram - @Coding_human
1) Asked my I'd card
2) Self intro
3) mentioned basics of Java
So he asked basics
4) Data types
5) Inheritance
6) Polymorphism
7) Exception
8) Are u willing to relocate
9) Are u comfortable with any
shifts
10) Are u interested in learning new
language
Telegram - @Coding_human
DCA java answer's
1. BC
D
2. {0,2,6,8}
3. public void addCrossMappings (CorsRegistry registry)
4. Failed
5. Display all the computer parts in ascending orders...
6. Larger Number: 25
7. There will be two errors....
8. A
9. 02
03
04
@Coding_human
10. -32767
11. 01
02
12. 5
D
1
4
13. Only i and ii
14. IT
Technical
15. Error
16. 25 days
telegram:- @Coding_human
https://t.me/Coding_human
1. BC
D
2. {0,2,6,8}
3. public void addCrossMappings (CorsRegistry registry)
4. Failed
5. Display all the computer parts in ascending orders...
6. Larger Number: 25
7. There will be two errors....
8. A
9. 02
03
04
@Coding_human
10. -32767
11. 01
02
12. 5
D
1
4
13. Only i and ii
14. IT
Technical
15. Error
16. 25 days
telegram:- @Coding_human
https://t.me/Coding_human