<u>Explanation:</u>
Remember, an algorithm in simple words means a set of instructions or steps to be followed in other to solve a problem.
Note, to decide which commute is cheaper, it means the output of the algorithm should be the cheaper way to commute.
Using pseudocode do the following;
- determine the inputs and outputs of the problem
- arrange the identified problem into micro-tasks
- describe each micro-tasks in the pseudocode
- Test the pseudocode by solving the problem.
Answer:
=SUM(A1:A4)
Explanation:
You can use the colon to shorthand a single continuous cell range.
Answer:
The answer is D. <em>os.path.exists(filename)</em>
Explanation:
Answer:
- jersey_dict = {}
-
- for i in range(5):
- j_num = int(input("Input Jersey's number (0-99): "))
- rating = int(input("Input rating (1 - 9): "))
- jersey_dict[j_num] = rating
-
- sorted_key = []
- for i in jersey_dict.keys():
- sorted_key.append(i)
-
- sorted_key.sort()
- for i in sorted_key:
- print(str(i) + ":" + str(jersey_dict[i]))
Explanation:
Firstly, define an empty dictionary (Line 1).
Next, use a for loop to prompt user to input five Jersey's number and rating and keep the input to the dictionary (Line 3-6). Next, create a list to hold the dictionary keys (Line 8-10). Use build in method, sort to arrange the keys in the list in ascending order (Line 12 ). At last, print the dictionary element by looping over the value in the sorted_key list (Line 14-15).
technology has impacted society by giving us a way to keep records, data, and documents. Technology has helped us on the education side by giving us a way to do projects, helping us study, and letting us email teachers.
This is the answer to the first questions not sure about the second question