Explanation:
def letterDigitCount(j):
dic={"digits":0,"letters":0}
for a in j:
if a.isdigit():
dic["digits"]+=1
elif a.isalpha():
dic["letters"]+=1
return dic
Answer:
price = float(input("Enter amount of a purchase: "))
shipping_price = 0.12* price
NJ_sales_Tax = 0.07*price
print('The price of item is {}'.format(price))
print('The Cost of Shipping is {}'.format(shipping_price) )
print('New Jessey Sales Tax is {}'.format(NJ_sales_Tax))
total_bill = shipping_price+NJ_sales_Tax+price
print('Total Bill {} ' .format(total_bill))
Explanation:
- Prompt User for input of the amount of purchase
- Calculate the shipping cost (12% of purchase price)
- Calculate the tax (7% of the purchase price)
- Use python's .format method to output an itemized bill
Answer:
Number of times new computer faster than old computer = 13.90 times (Approx)
Explanation:
Given:
Clock speed of old computer = 266 MHz
Clock speed of new computer = 3.7 GHz
266MHz = 0.266GHz
Find:
Number of times new computer faster than old computer
Computation:
Number of times new computer faster than old computer = Clock speed of new computer / Clock speed of old computer
Number of times new computer faster than old computer = 3.7 / 266
Number of times new computer faster than old computer = 3.7 / 0.266
Number of times new computer faster than old computer = 13.90 times (Approx)
Answer:False
Explanation: Pipeline architecture works in a way where the processing or execution of one stage is done and then processes instruction in the next stage in a sequence to achieve the good performance of program. But due to conditional branching the stalls are caused which creates error and the program has to restart from different node because sequence get disrupted.Therefore the statement given is false.