To accomplish this without using a loop,
we can use math on a string.
Example:
print("apple" * 8)
Output:
appleappleappleappleappleappleappleapple
In this example,
the multiplication by 8 actually creates 8 copies of the string.
So that's the type of logic we want to apply to our problem.
<span>def powersOfTwo(number):
if number >= 0:
return print("*" * 2**number)
else:
<span>return
Hmm I can't make indentations in this box,
so it's doesn't format correctly.
Hopefully you get the idea though.
We're taking the string containing an asterisk and copying it 2^(number) times.
Beyond that you will need to call the function below.
Test it with some different values.
powersOfTwo(4) should print 2^4 asterisks: ****************</span></span>
Answer:
<em><u>To create a Scanner object, you use the new keyword. To create a Scanner object that gets input from the keyboard, specify System.in in the parentheses. To use one of the methods of a Scanner object, code the object name, a dot (period), the method name, and a set of parentheses.</u></em>
Answer:
The user cannot make internal changes, or personalize the computer. Also it would make it very easy for viruses to get into the computers and ccorrupt the entire thing. There is a similar example of this today in Modern Day chromebooks, but earlier computers were not as safe or secure. Also the fact that it can takes up massive amounts of data, requiring more server storage or data storage facilities.
Answer: (B) evaluate current skill level and determine what skills are necessary to advance
Explanation: A professional development plan is used to assess your current skills and see what’s needed to further advance within the field.
Answer: Snort
Explanation:Snort is a system which provides the service of the prevention of the intrusion. This system works as the open source for provision of the logging of packets and traffic analysis.
The functions in the snort are analysis of the protocol, content matching , searching etc. The main purpose of it is for the detection of the attack like stealth port ,CGI attacks etc.Other options are incorrect because they don't provides attack detection service.Thus the correct option is snort.