Hello,
Answer:
<h2>--//Triangles Algorithm</h2>
Declare the variables of the side of each triangle, in this case, a, b, and c, and input them.
If a^2 == b^2 + c^2
display "This triangle IS right-angled."
Else
display "This triangle is NOT right-angled
Explanation:
The meaning of the word "algorithm" in this situation would be the coding of the program that you are assigned to create. I'll use Python in this. Display, in this case, will mean "print"
Answer:
#code (count_seq.py)
def count_seq():
n='2'
while True:
yield int(n)
next_value=''
while len(n)>0:
first=n[0]
count=0
while len(n)>0 and n[0]==first:
count+=1
n=n[1:]
next_value+='{}{}'.format(count,first)
n=next_value
if __name__ == '__main__':
gen=count_seq()
for i in range(10):
print(next(gen))
Explanation:
- Start with number 2. Use string instead of integers for easy manipulation
.
- Loop indefinitely
.
- Yield the integer value of current n
.
- Loop until n is an empty string
.
- Loop as long as n is non empty and first digit of n is same as first
.
- Append count and first digit to next_value
.
D. half period because it is the converting of bidirectional current flow to unidirectional currency flow.
when ur looking at a hard drives time is measured in milliseconds