Answer:
import re
with open("../../Downloads/Tweets.txt","r", encoding="utf-8") as tweets:
myfile = tweets.readlines()
for item in myfile:
item = item.rstrip()
mylist = re.findall("^RT (.*) ", item)
if len(mylist) !=0:
for line in mylist:
if line.count("#") >=1:
ln = line.split("#")
dm = ln[1]
print(f"#{dm}")
Explanation:
The python source code filters the document file "Tweets" to return all tweets with a hashtag flag, discarding the rest.
Answer: C 475
Explanation: These choices are A. 375, B. 276, and D. 575. so that wolde mean it would be C 475.
Answer:
You can use the pop() method to remove specific elements of a list. pop() method takes the index value as a parameter and removes the element at the specified index. Therefore, a[2] contains 3 and pop() removes and returns the same as output.
Explanation:
Hope it helps you!
Answer:
no_of_shares = int(input("Enter the number of shares: "))
purchase_price = float(input("Enter the purchase price of the stock: "))
sale_price = float(input("Enter the sale price of the stock: "))
total_stock_price = purchase_price*no_of_shares
total_spend_on_buying = total_stock_price + (0.03*total_stock_price)
total_sale_price = sale_price*no_of_shares
commission_while_selling = total_sale_price*0.03
net_gain_or_loss = total_sale_price - (total_spend_on_buying + commission_while_selling)
if(net_gain_or_loss<0):
print("After the transaction, you lost {} dollars".format(abs(net_gain_or_loss)))
else:
print("After the transaction, you made {} dollars".format(abs(net_gain_or_loss)))
Answer:
d. Information governance board
Explanation:
In 2004 <em>Intel </em>was in need of a governance process as part of the company’s policy of <em>Intel’s Information Management (IMM)</em>. Such policies and governance were important in the corporation’s process in order to mirror the local laws as well as to reproduce Intel’s dynamic nature of its activities as a corporation. The <em>Information Governance Boards </em>were intended for every main data area of the company: <em>location, item, finance, customer, supplier, and worker</em>. Such Governance Boards would engage business people in the company to embrace the stipulated policies also with the purpose of proptecting information.