CODING SOLUTIONS | IBM | AMAZON CODING SOLUTIONS
Kanalga Telegram’da o‘tish
8 815
Obunachilar
Ma'lumot yo'q24 soatlar
-207 kun
-11730 kun
Postlar arxiv
2.Succesive Factor program
import java.io.*
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
String b = finduccesivefactor(a);
System.out.println(b);
}
public static String finduccesivefactor(int input1){
int x = (int)(Math.sqrt(input1));
if(x*(x+1)==input1){
return "T"+x+""+(x+1);
}
else{
int f=0;
for(int i =2;i<=input1/2;i++){
if(input1%i==0){
f=1;
break;
}
}
if(f==0&&input1>1){
return "Tisprime";
}
else{
return "FNotPrime";
}
}
}
}
✅Telegram :https://t.me/coding_solutions_all
T3 solutions 11-12
1. Ronaldo people's faces- Neural network
2.Nltk
3. Developer missing value - 1
4. Developer tree - decision tree
5. Cumulative distribution- 1
6. Cobalt salary missing value - 1
7. Root word - Stemming
8. Flat no. - 2
9. Developer - min max
10. Emily - 2
11 - [12]
12- developer wants to - 3
13. List to numpy1d - 1
14. Data frame - 1
15. Developer Age dob prof- 1
16. Jessica- value error
17. Scale dataset - 4
18. Machine learning -3
19. Convert 2d to multi - 1
20. Senior ml engg-
21. Contiguous flatten- ravel/rollaxis
22. Ryan-c
23. Max- ndlm
24. John -
25. Rick-
25. Scipy library-
25. Tony-
27. Monica-
28. clark index column - 1
✅Telegram :https://t.me/coding_solutions_all
T3 solutions
1. A developer wants --- decision tree
2 . Which of the following - NLTK
3 Ronaldo - neural
4 Cobalt - df is null
5 Root - steamming
6 Ricks - n.shape()
7.monica-tfidf
✅Telegram :https://t.me/coding_solutions_all
☝Use double underscores before and after init in 2 and 8 th line
PYTHON CODE ✅
class Magazine:
def init(self,author,viewer,cost,name):
self.author=author
self.viewer=viewer
self.cost=cost
self.name=name
class Publisher:
def init(self,house,mlist):
self.house=house
self.mlist=mlist
def findminimumMagazineByViewers(self):
if len(self.mlist)==0:
return None
else:
self.mlist.sort(key=lambda x : x.viewer)
return self.mlist[0]
def sortMagazineByCost(self):
if len(self.mlist)==0:
return None
else:
self.mlist.sort(key=lambda x : x.cost)
return self.mlist
n=int(input())
li=[]
for _ in range(n):
A=Magazine(input(),int(input()),float(input()),input())
li.append(A)
X=Publisher("Sayan",li)
y=X.findminimumMagazineByViewers()
z=X.sortMagazineByCost()
if y==None:
print("No Data Found")
else:
print(y.author)
print(y.viewer)
print(y.cost)
print(y.name)
if z==None:
print("No Data Found")
else:
for i in z:
print(i.cost)
✅Telegram :https://t.me/coding_solutions_all
PYTHON UNIX ✅
awk 'BEGIN{FS=","} {print($2,$4)}END{}'
✅Telegram :https://t.me/coding_solutions_all
JAVA UNIX CODE 100% ✅
awk 'BEGIN{FS = ",";OFS ="|"}{
print $1,$2,$3,$4,$5,($4-$5);
}
END{}' | sort -t "|" -nk6
✅Telegram :https://t.me/coding_solutions_all
🤡TCS JAVA PRA
1.displying
2.C
3.A
4.C
5.A
6.D
7.B
8.BOTH
9.order by
10.C
11. A
12.A
13.declaration
14. C
15.True
16.A
17.href
18.A
19.A
20. C
21.A
22.C
23.D
24.A
25. Fasle
26.D
27.True
28.B
29.false
30.C
✅Telegram :https://t.me/coding_solutions_all
🃏TCS PYTHON PRA
1) like
2)A
3)C
4)A
5)D ( Mishra record)
6)C (renaming)
7)C (10 will be displayed)
8) B
9)D
10)B
11) Many
12)C
13)D
14) Hello world
15)12,15,18
16)D (inheritance)
17) True
18)B
19)A
20)A
21) Mark
22)B
23)C
24)yes
25)All
26)All
27)A
28)B
29)D
30)B
✅Telegram :https://t.me/coding_solutions_all
PYTHON PRA
1) like
2)A
3)C
4)A
5)D
6)C
7)C
8) B
✅Telegram :https://t.me/coding_solutions_all
