Answer:
import re
def country_capita():
#opens file
file=open("inputfile.txt", "r")
dictionary=dict()
#reads line by line
for line in file.readlines():
# substitutes for multiple space a single space
line = re.sub(r"[\s]{2, }", ' ', line)
list=[]
#splits line on space
list=line.split(" ")
#put into dictionary
dictionary[list[1]]=list[2]
# get input
while True:
choice=input("Enter the country name or quit to exit: ")
if choice=="quit":
break
elif choice in dictionary.keys():
print(dictionary[choice])
else:
print("Invalid Country")
country_capita()
Explanation:
Using python to code this program. First we, (line 1) import the re module which offers us a set of functions that allows us to search a string for a match. ((line 2) Next we define a function country_capita() that will open rawdata_2004.txt, read the information within line by line and create a dictionary list. The we create a while loop with conditional statements that prompt the user to enter country names, print the corresponding values and stops when the user enters quit.
Answer:
B. having lunch with a friend
Explanation:
Lifelong learning can be defined as a continuous, self-motivated, and self-initiated learning activity that is typically focused on personal or professional development. Thus, it's a form of education that is undertaken throughout life with the sole aim of pursuing knowledge, competencies, and skills for either personal or professional growth and development, especially after acquiring a formal education.
Some examples of lifelong learning includes the following;
I. Reading a trade magazine.
II. Reviewing a textbook.
III. Studying an encyclopedia.
Answer:
Detailed solution is given in attached diagram and the answers are given below:
Explanation:
(a) 4 bits are devoted for line sizing.
(b) 2 bits are devoted for indexing
(c) 1 bit is devoted for the tag
Answer: 0.48
Explanation:
The acid test ratio will be calculated as:
Cash = $100,000
Add: Short term investments = $17,000
Add: Net Current Receivables = $250,000
Total Assets = $367,000
/ Total Current Liabilities = $760,000
Acid Test Ratio will now be:
= Total Assets / Total Liabilities
= $367000/$760000.
= 0.48
Therefore, the acid test ratio is 0.48.