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
Answer:
B. Symmetric key encryption
Explanation:
Symmetric key encryption is one in which a single encryption key is sent to the receiver so both sender and receiver share the same key. In this type of encryption, the sender uses a particular key to encrypt the data and sends the encrypted data (cipher data) to the receiver and then the receiver uses the same key to decrypt the data.
Public key encryption, or asymmetric encryption uses two keys - a private key and a public key. The public key is know to everyone while the private key is known only to those for whom the message is intended. An application of this type of encryption is in SSL (Secure Sockets Layer) - a protocol for transmitting data privately on the internet.
Private key encryption is not exactly one of the encryption methods but rather, a private key and a public key are used in encryption.
The best option is therefore <em>symmetric key encryption</em>.
<em>Hope this helps!</em>
C++:
int main () {
std::ofstream output {"greeting.txt"};
output << "hey!";
output.close();
return 0;
}