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:
A. inspection
Explanation:
To find - Monica, a reviewer, wants to use a formal review for the SQA process. Which review should Monica use for this purpose?
A. inspection
B
. internal audit
C. test review
D
. walkthrough
Proof -
SQA process - Software Quality Assurance process
The correct option is - A. inspection
Reason -
Formal review in software testing is a review that characterized by documented procedures and requirements. Inspection is the most documented and formal review technique.
The formality of the process is related to factors such as the maturity of the software development process, any legal or regulatory requirements, or the need for an audit trail.
The formal review follows the formal process which consists of six main phases – Planning phase, Kick-off phase, the preparation phase, review meeting phase, rework phase, and follow-up phase.
Answer:
00100110
a and d are invalid sequences because they contain an even number of 1's.
Explanation:
Odd parity means that you want an odd number of 1's in the resulting set of bits. Since there are 3 (=odd) bits in the set, a zero must be added to keep the total odd.
Basically, electrocution is the use of electric shock in order to kill someone. Based on the given statements above, the one that is synonymous with this definition is option C. This is when a high amount of electrical energy is being exposed to someone. Hope this helps.