Not necessarily, if you are sourcing the information you have used to come to your own conclusion then that isn't plagiarism, however if you just copy paste completely and use it as your own work then yes it is plagiarism. <span />
Answer:
sqsum4
Explanation:
So to raise a number to a power in python, you can use the ** operation, which is usually confused with the ^, which is an operation, but it is not for raising numbers to a power. It is the xor bit operation, which if you don't know at the moment, it's fine, since it's not necessary for this. each of these lists uses a generation comprehension which is generally defined as: (x for x in object if condition) with the if condition being optional, but in this case it's necessary. If it's a bit confusing, you can define a generator using a function so it's a bit more spread out:
def generator(object):
for x in object:
if condition:
yield x
Although in this instance were going to be performing some operation on x, which in this case is squaring it. So let's just look at the two functions that use the **, since they should be the only options that will be correct.
sqsum1(nums):
This function does square x, except it uses incorrect syntax. The condition should come after the for loop. Python likely wont tell you this, because it may think you're trying to do something else. You can do one line if statements like this: a if condition else b, which will return a if the condition is true, and b if it isn't. So it may think that you're trying to do this one line if statement, and say that you're missing an else. The function could even implement in this way: <em>x**2 if x > 0 else 0 for x in nums</em>. This way if the x is negative it counts as 0, or in other words isn't counted towards the sum. But without this fix, the function will raise a syntax error
sqsum4(nums):
This will square each number in x only if the current element "x" is greater than 0, or in other words positive. And then it returns the sum. So this function returns the expected output
Answer:
ALU
Explanation:
Arithmetic Logic Unit (ALU) is the part of the microprocessor that performs arithmetic operations, such as addition, subtraction, AND, OR, NOT, XOR etc. ALU is also used for comparison of input numbers.
<u>HOW IT WORKS:</u>
When the code is compiled, the code is converted first to assembly language and then assembly language is converted to machine code.
In Machine language, each arithmetic or logic operation has a specific code known as OPCODE. This opcode tells ALU which operation to perform on the inputs.
A Trusted Platform Module is a specialized chip on an endpoint device that stores RSA encryption keys specific to the host system for hardware authentication. Each TPM chip contains an RSA key pair called the Endorsement Key. The pair is maintained inside the chip and cannot be accessed by software.
Thinking Externally:
Keyboard -> input
Mouse -> input
Monitor -> output
Printer -> output
Speakers -> output
A Trackpad, if you want to count that -> input