Explanation:
Monitoring someone's emails,voice mails and computer files is considered is illegal because you are accessing someone's personal information which is not regarded as ethical .
There are certain reasons where one's email,voice mails and computer files can be monitored are as following:
- Protect the security information and security.
- Investigation of complaints of harassment.
- Preventing personal use of employer's facilities.
Answer:
"Option 4: ZeroDivisionError" is the correct answer
Explanation:
When we try to divide any number by zero in mathematics, the answer is infinity. Similarly, if we try to divide a number by zero in Python, the Python interpreter throws a "ZeroDivisionError" as the denominator or divisor cannot be a zero.
Hence,
"Option 4: ZeroDivisionError" is the correct answer
But you can't use this device alone to connect two microphones to your USB C port and expect it to have usable volume. So the description is somewhat misleading ...
Answer:
import random
arr=[]
for i in range(100):
arr.append(i)
while True:
answer=random.choice(arr)
guess=int(input("enter your guess number between 0-100: "))
if answer is guess:
print("right guess\ncongratulations.....")
print("the answer was: "+str(answer))
break
elif guess < answer-20:
print("you guessed too low....\ntry again")
print("the answer was: "+str(answer))
elif guess > answer+20:
print("you guessed too high....\ntry again")
print("the answer was: "+str(answer))
else:
print("incorrect guess\ntry again")
print("the answer was: "+str(answer))
Explanation:
Here is my solution. I did the following:
- changed the setRemover into a constructor, since the comment seems to hint that that is expected.
- changed the lookFor type into a String, so that it can work with the string replace overload. That's convenient if you want to replace with an emtpy string. The char type won't let you do that, you can then only replace one char with another.
- Added a static Main routine to use the class.
import java.lang.System.*;
public class LetterRemover
{
private String sentence;
private String lookFor;
public LetterRemover() {}
// Constructor
public LetterRemover(String s, char rem)
{
sentence = s;
lookFor = String.valueOf(rem);
}
public String removeLetters()
{
String cleaned = sentence.replace(lookFor, "");
return cleaned;
}
public String toString()
{
return sentence + " - letter to remove " + lookFor;
}
public static void main(String[] args)
{
LetterRemover lr = new LetterRemover("This is the tester line.", 'e');
System.out.println(lr.toString());
String result = lr.removeLetters();
System.out.println("Resulting string: "+result);
}
}