The purpose of anti-bullying laws is so that people aren’t getting bullied because when someone gets bullied it could cause them to become depressed and not happy on who they are
Answer:
userInput = input("Please enter a string of words ")
userInput.split ()
for item in userInput.split ():
if item =="darn":
print("Censored")
break
else:
print(userInput)
Explanation:
Using Python programming language, the input function is used to receive the users input and save in a variable userInput
Then the .split method is used to convert the words into a list of words.
Using a for loop, the code checks for the word darn and prints censored if it exists else it prints the userInput
You are going to select 5 keyboards, from a set of 25 defective keyboards. When you select the first keyboard it may be have either electrical deffects or mechanical deffect, this is two possibilities. The same happens with the second, third, fourth and fifth selection. Then each selection has 2 different possibilities, and the number of possibilities are: 2*2*2*2*2 = 32.
But that is considering that the order matters. This is that it is different that the first has electrical deffects and the others have mechanical defects than the second has mechanical electrical deffects and the other has mechanical deffects.
If you the order is not relevant, then the only different outcomes are:
1) 5 with electrical deffects
2) 4 with electrical deffects and 1 with mechanical deffects
3) 3 with electrical deffects and 2 with mechanical deffects
4) 2 with electrical deffects and 3 with mechanical deffects
5) 1 with electrical deffects and 4 with mechanical deffects
5) 5 with mechanical deffects.
In this case the answer is 6 different ways.
Answer: 6
Idk what language so this is java
int count_occurrences(String a, String b) {
int count = 0;
for(int i =0; iif(a.charAt(i) == b.charAt(0)) {
count++;
}
}
return count;
}