Answer:
Code is given below:
Explanation:
.data
str1: .space 20
str2: .space 20
msg1:.asciiz "Please enter string (max 20 characters): "
msg2: .asciiz "\n Please enter string (max 20 chars): "
msg3:.asciiz "\nSAME"
msg4:.asciiz "\nNOT SAME"
.text
.globl main
main:
li $v0,4 #loads msg1
la $a0,msg1
syscall
li $v0,8
la $a0,str1
addi $a1,$zero,20
syscall #got string to manipulate
li $v0,4 #loads msg2
la $a0,msg2
syscall
li $v0,8
la $a0,str2
addi $a1,$zero,20
syscall #got string
la $a0,str1 #pass address of str1
la $a1,str2 #pass address of str2
jal methodComp #call methodComp
beq $v0,$zero,ok #check result
li $v0,4
la $a0,msg4
syscall
j exit
ok:
li $v0,4
la $a0,msg3
syscall
exit:
li $v0,10
syscall
methodComp:
add $t0,$zero,$zero
add $t1,$zero,$a0
add $t2,$zero,$a1
loop:
lb $t3($t1) #load a byte from each string
lb $t4($t2)
beqz $t3,checkt2 #str1 end
beqz $t4,missmatch
slt $t5,$t3,$t4 #compare two bytes
bnez $t5,missmatch
addi $t1,$t1,1 #t1 points to the next byte of str1
addi $t2,$t2,1
j loop
missmatch:
addi $v0,$zero,1
j endfunction
checkt2:
bnez $t4,missmatch
add $v0,$zero,$zero
endfunction:
jr $ra
Answer:
He wore his black suit, another color of shirt (not purple) and shoes
Explanation:
Holmes owns two suits: one black and one tweed.
Whenever he wears his tweed suit and a purple shirt, he chooses not to wear a tie and whenever he wears sandals, he always wears a purple shirt.
So, if he wore a bow tie yesterday, it means he wore his black suit, another color of shirt (not purple) and shoes because the shirt color is not purple
Answer:
Both Technician A and B
Explanation:
In a vehicle suspension system, a shock absorber has the functions such as; limiting the movement of the vehicle, stabilizing the ride, stabilizing the tires of the vehicle, minimizing wear and tear in the vehicle and decreasing the overall suspension tear. Some of the ways of maintaining shock absorbers is to inspect the strut for leaks.Shock oil sometimes leaks to cover the seals with a transparent liquid.
Answer:
engine B is more efficient.
Explanation:
We know that Carnot cycle is an ideal cycle for all working heat engine.In Carnot cycle there are four processes in which two are constant temperature processes and others two are isentropic process.
We also kn ow that the efficiency of Carnot cycle given as follows

Here temperature should be in Kelvin.
For engine A



For engine B



So from above we can say that engine B is more efficient.
Answer:
import pandas pd
def read_prices(tickers):
price_dict = {}
# Read ingthe ticker data for all the tickers
for ticker in tickers:
# Read data for one ticker using pandas.read_csv
# We assume no column names in csv file
ticker_data = pd.read_csv("./" + ticker + ".csv", names=['date', 'price', 'volume'])
# ticker_data is now a panda data frame
# Creating dictionary
# for the ticker
price_dict[ticker] = {}
for i in range(len(ticker_data)):
# Use pandas.iloc to access data
date = ticker_data.iloc[i]['date']
price = ticker_data.iloc[i]['price']
price_dict[ticker][date] = price
return price_dict