Answer:
for i in range(0,10):
if SimonPattern[i] == UserPattern[i]:
score = score + 1
i = i + 1
else:
break
if i == 9:
score = score + 1
print("Total Score: {}".format(score))
Explanation:
This for loop was made using Python. Full code attached.
- For loop requires a range of numbers to define the end points. For this Simon Says game, we are talking about 10 characters, so that must be the range for the for loop: from 0 to 10.
- Conditional if tests if Simon pattern matches User's one characheter by one and add point for each match.
- Break statement is ready to escape the for loop at first mismatch.
- As we are starting from index 0, if the users matched all the characters correctly, then we need to add 1, otherwise the maximun score would be 9 and it should be 10.
Answer:
hhahhhwghwhwhwhwjwnwjnnnnwnwwnw
Explanation:
jwkwkkwoiwiwiwiwiwowwiwowowiiiiwuuwuwgeevehehsvhsvwhbhhehehwgjjwhwhjwjqwjjuuuwi####!\\\\e
Answer:
Coat new O-rings (D) with silicone oil or polyalkyleneglycol (PAG) oil, and pull them on the injectors.
Answer:
Part A:

CPI cannot be negative so it is not possible to for program to run two times faster.
Part B:

CPI reduced by
=80%
Part C:
New Execution Time=
Increase in speed=
Explanation:
FP Instructions=50*106=5300
INT Instructions=110*106=11660
L/S Instructions=80*106=8480
Branch Instructions=16*106=1696
Calculating Execution Time:
Execution Time=
Execution Time=
Execution Time=
Part A:
For Program to run two times faster,Execution Time (Calculated above) is reduced to half.
New Execution Time=

CPI cannot be negative so it is not possible to for program to run two times faster.
Part B:
For Program to run two times faster,Execution Time (Calculated above) is reduced to half.
New Execution Time=

CPI reduced by
=80%
Part C:

New Execution Time=
New Execution Time=
Increase in speed=