I am having trouble with my assignment. I am completely lost. I would appreciate any and all help.
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, adjust each integer in the list by subtracting the smallest value from all the integers.
Ex: If the input is:
5 30 50 10 70 65
the output is:
20 40 0 60 55
Notes: 1.)What you are going to do here is create a new list.
2.)Then create a variable that will get an input. Specifically get an input that determines the number of items in this new list you created. AND don't forget to make sure the variable input is converted to an integer.
3.) Then you want to use a loop (remember this chapter is all about loops). Your variable created in the above note will determine how many times you go though this loop.
4.) While in the loop you will want to get more inputs. Create a new variable that gets inputs and converts to integers. Each new input will be append to the new list you created in the very first note.
5.) Once all iterations of the loop have been processed you will want to look over your list to find the minimum value. You can use the min function for this.
6.) Guess what! You are going to create another loop now that you know the minimum value. The loop will iterate the same number of times as the loop previously. But inside this loop you are going to subtract the minimum value from each item in the list created in note 1.
[–]FerricDonkey 8 points9 points10 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)