Menu

Piece Python Program Suggested Solution Prior Question Fh Input Enter Data Print Ninput Fh Q43877759

This piece of Python program is the suggested solution for myprior question

fh = input (“Enter your data: “)
print (“nInput fh is: ” +fh)
n = 0
fh_list = fh.split()
for line in fh_list:
print(line)
if line.startwith(” * “):
n += 1
print (n)

However, for this data (A)

*gi|142022655|gb|EQ086233.1|
*gi|142022655|gb|EQ086233.1|
*gi|142022655|gb|EQ086233.1|
*gi|142022655|gb|EQ086233.1|
*gi|142022655|gb|EQ086233.1|
*gi|142022655|gb|EQ086233.1|

The program gave 0 count!!!

And for this data (B)

*gi|142022655|gb|EQ086233.1|*gi|142022655|gb|EQ086233.1|*gi|142022655|gb|EQ086233.1|*gi|142022655|gb|EQ086233.1|*gi|142022655|gb|EQ086233.1|*gi|142022655|gb|EQ086233.1|

The program still gives 1 count.

I need the program which gives result count 6 withdata (A)

I need

Expert Answer


Answer to This piece of Python program is the suggested solution for my prior question fh = input (“Enter your data: “) print (“n…

OR