Answer:
Check the explanation
Explanation:
print("************************************************************")
sentence = input("Enter a sentence : ").split()
replace_words = input("\nEnter the words that should be replaced : ").split()
special = input("\nEnter the replacing special Character : ")
result = []
for word in sentence:
if word not in replace_words:
result.append(word)
else:
result.append(special * len(word))
result = ' '.join(result)
print("\nThe Sentence with words censored is : " + result)
print("************************************************************")
Answer:
b. size
Explanation:
We can use the size() method of java.util.ArrayList to determine the size of an ArrayList in Java. The size() method of the ArrayList class returns an integer which is equal to the number of elements present in the ArrayList.
Below is an example code to illustrate the use of the size() method of the ArrayList:-
ArrayList<Integer> aList = new ArrayList<Integer>(5);
aList.add(25);
aList.add(2);
aList.add(5);
aList.add(22);
System.out.println("Size of the array list: " + aList.size());
This will print the size of the array list as 4 since we've added four numbers into the array list.
Dont talk in abbreviations to elders, most of them might not know what that means and youll likely have to teach them
the answer is true hope it helps