Answer: D. Searches for a file only in the directories that are in the path variable
Answer:
- You need to create a variable outside (before) the input loop.
- You need a variable inside your loop that temporarily holds the user input.
- In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.
I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.
<u>Code (Python)</u>
largestnum = 0
for x in range(6): <em>#loops 6 times</em>
newnum = int(input("Enter a number: ")) #ask user for input & converts to int.
if newnum > largestnum: <em>#if new number is greater than largest num </em>
largestnum = newnum <em>#make it the largest number</em>
<em> </em>print("Largest:", largestnum)
The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.
............................... ? ................................
The value of total resistance of resistors connected in parallel is calculated through the equation,
R = 1 / (1/R1 + 1/R2 + 1/R3 + 1/Rn)
Substituting the known values,
R = 1 / (1/2 + 1/6 + 1/10)
R = 30/23 ohms
The formula for power with the use of resistance and voltage is,
P = V² / R
Substituting,
P = (100 V)² / (30/23 ohms)
P = 7.67 kW
Thus, the answer to this item is letter C.