Answer:
The problem of the question code is as follows:
Explanation:
- There must be the items in the list: The above question code is in python language. The temps are a list type variable that is used to hold the collection of items or value. But in the above code, there is no item in the K list. So first remove this problem with the help of add the value on the list. There are two ways to add value to the list:- 1. Define the static list element by writing like "temps=[1.2,2.4,4.5]". and 2. Take input from the user and then add by "temps.append(item)".
- The syntax of the for loop: The syntax of the for loop is not right because it holds the "range" keyword which is written when we give the numeric value like, "for x in range(2)" or "for x in range(1,2)". So to correct for syntax the user needs to write "for k in temps:".
If the user removes the above-defined error from the code then the above code will run correctly
Answer:
Check the explanation
Explanation:
Please find the code down
def selection_sort_descend_trace(numbers):
i=len(numbers)
print("Output: ")
for num in range(0,i-1):# traversing from 0 to N-2, total N-1 iterations
val=numbers[num]
start=num+1
end=i
t=0
for j in range(start,end):
if(val<numbers[j]):
remember=j
val=numbers[j]
t=1
if(t==1):# swaping onlf if greater number is available
temp=numbers[num]
numbers[num]=val
numbers[remember]=temp
for p in range(i):# printing
print(numbers[p],end=' ')
print("\n")
if __name__ == "__main__":
print("Enter the integers separated by space: ")
numbers=[int(x) for x in input().split(' ')]
selection_sort_descend_trace(numbers)
Taking input as string and splitting with space as delimiter , converting the split part to integer , finally append in the list.
Answer:
Windows Automatic Backup Tool Which Windows tool lets you perform automatic backups at regular times? For regular backups, using third-party automatic file backup program is highly suggested. However, some of you choose to use File History or Windows Backup and Restore (Windows 7).
Explanation:
A sample pseudocode that can be used to perform the operation is:
Print "What is your age?"
If Age > 65
Print "You are of retirement age"
If input= "5"
Terminate
Else
End
<h3>What is a Pseudocode?</h3>
This refers to the plain language that makes a description of the sequence of steps used to execute a program.
Hence, we can see that based on the user request, there is the sample pseudocode that would ask for input, if the age is greater than 65, a print function would be used and the program can be terminated if a specific number (5) is put.
Read more about pseudocodes here:
brainly.com/question/24735155
#SPJ1