Answer:
> It will run out the function under the if statement.
Explanation:
> As an if-else statement is saying if (something = something, etc) do (this this and this [let’s refer to this as 1]) Else do (this this and not this [let’s refer to this as 2]) Since it is true, it will do the original function (1).
> It is saying if this is true, then do this (1). If it is not true, then do this (2). Basically the else is there in case the if is not true, or equal to anything other than what’s intended.
> Since it is true however, it will do what the original function (1) is. So this is our correct answer. Once again, it is; “It will do the original function under the if statement”.
> I hope this answered your query, and any other questions you may have had on the subject. #LearningWithBrainly
I would have to say D) because they know the real answer.
Answer:
result = 0
i = lo
while i <= hi:
result = result + i
i += 1
Explanation:
Initialize the <em>result</em> as 0 to hold the summation value.
Since we are asked not to change the value of <em>lo</em> and <em>hi</em>, our loop control variable is <em>i</em> and initially it starts from <em>lo.</em>
Since we are asked to add the number from <em>lo</em> to <em>hi, </em>while loop condition checks it.
While the condition satisfies (during each iteration), the value of <em>i</em> is added to the result and the value of <em>i</em> is incremented by one.
Answer:
I've implemented this program using python
userinput = int(input("Length: "))
mylist = []
mylist.append(userinput)
for i in range(1,userinput+1):
userinp = int(input("Input: "))
mylist.append(userinp)
smallval = mylist[1]
for i in range(1,len(mylist)):
if smallval > mylist[i]:
smallval = mylist[i]
for i in range(1,len(mylist)):
mylist[i] = mylist[i] - smallval
for i in range(1,len(mylist)):
print(mylist[i],end=' ')
Explanation:
I've added the full source program as an attachment where I used comments to explain difficult lines
A i believe is the answer