Explanation:
Exterior gateway protocol are the routing protocols that are used on the internet for exchanging routing information among the autonomous system. These autonomous systems can be gateway protocol, vector routing protocol.
Answer:
Explanation:
With the advance in technology, smartphones, and tablets are built to meet the ever-increasing needs of users.
Smartphones are mobile phones that also have internet connectivity, they can be used to make calls and perform many tasks just like the conventional desktop. Smartphones and tablets are indeed considered computers because they also process inputs in form of commands and they produce outputs.
Smartphones and tablets are capable of handling rich content and interactivity because:
1. Wireless synchronization with other devices: Just like desktops, laptops, they can interact with other devices, and can receive and also send information doesn't matter the distance.
2. They have Internet connectivity.
3. They have strong hardware, good storage capacity.
4. They have inbuilt software and are capable of accepting other software and programs.
5. They are built with an appealing user interface.
6. Just as computers have processors, smartphones and tablets also have processors to ensure their speed at processing informations.
Answer:
- from matplotlib import pyplot as plt
-
- with open("text.txt") as file:
- data = file.readlines()
- category = []
- amount = []
- for row in data:
- values = row.split(" ")
- category.append(values[0])
- amount.append(float(values[1]))
-
- figure = plt.figure()
- ax = figure.add_axes([0,0,1,1])
- ax.axis('equal')
- ax.pie(amount, labels = category, autopct='%1.2f%%')
- plt.show()
Explanation:
Firstly, we need to import matplotlib library (Line 1).
Next, open a file stream and use readlines method to read the data from the text file (Line 4). Presume the data read from the text files are as follows:
Rent 450
Gas 150
Food 500
Clothing 120
Car 600
Create two lists, category and amount (Line 5-6). Use a for loop to traverse through the read data and use split method to break each row of data into two individual items. The first item is added to category list whereas the second item is added to amount list (Line 7 - 10).
Next, create a plot figure and then add the axes (Line 12 - 13). We can use the pie method to generate a pie chart (Line 15) by setting the amount list as first argument and category list as value of labels attributes. The output pie chart can be found in the attachment.