Answer:
see explaination
Explanation:
I made use of python program to solve this.
text file name with fun.txt.
6 fun. 3 hello 10 <> 2 25 4 wow!
Program code:
import re
file = open('fun.txt','r') #for reading file
strings="" #declaring empty string
for k in file:
strings=strings+k #all character in file is storing in strings variable for do operations
pattern = '\s' #for pattern \s is for space
result = re.split(pattern, strings) #split the string with space
for k in range(len(result)): #loop through the list of string
if(k%2) == 0: #checking for integer to time of string
p=int(result[k])
print(result[k+1] *p) #print times of the string(k+1)
Check attachment for output
Answer with Explanation:
Ang "maikling kuwento" ay isang uri ng<em> kathang-isip</em> na may pagkapareho sa nobela. Ito'y may buong tema ngunit mas maikli kaysa sa nobela at mas madali rin itong matapos basahin. Hango ito sa mga tunay na pangyayari sa buhay ng tao. Binubuo ito ng limang elemento: <em>tauhan, tagpuan, hidwaan, tema at plot. </em>Ito'y may balak na pukawin ang damdamin ng nagbabasa ayon sa kalagayan ng mga tauhan sa kuwento at ito'y nag bibigay ng mabuting aral.
Si <em>Edgar Allan Poe</em> ang tinaguriang<em> "Ama ng Maikling Kuwento." </em>
You can install Eclipse. If you want you can look into the Ubuntu store and see if they have any.
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)))