Sorry, I am going to copu and paste the post with the tags
Hello!!
I am coding what should be an easy program, to calculate few things. But, unfortunately, the things are not going as I planned.
This is my code:
Hi Afterdarkreader,
I've already tried your suggestion and no luck at all. I've tried several solution, also
Hello again,
I've used this version of python and Ipython and the script worked perfectly. any guess?
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
Hello!!
I am coding what should be an easy program, to calculate few things. But, unfortunately, the things are not going as I planned.
This is my code:
seq_T4 ='MILKILNEIASIGSTKQK....NTFEDVFGDFHEVTGL' y = 0 w = 0 f = 0 num_aa = 0 for aa in seq_T4.lower(): num_aa += 1 if aa == 'y': y += 1 elif aa == 'w': w += 1 elif aa == 'f': f += 1 aa_fluo = y + w + f ratio = aa_fluo / num_aa print ('the protein as', num_aa, 'aa, and therefore MW of roughly kDa', (num_aa*650)/1000) print ('the number or Tyrosine is:', y) print ('the number or Tryptophan is:', w) print ('the number or Phenylalanine is:', f) a = 43/487 print ('the Fluorescent aa / total aa is ', format(ratio,'.5f'))
Output:('the protein as', 38, 'aa, and therefore MW of roughly kDa', 24)
('the number or Tyrosine is:', 0)
('the number or Tryptophan is:', 0)
('the number or Phenylalanine is:', 3)
('the Fluorescent aa / total aa is ', '0.00000')
(Dec-20-2017, 09:02 PM)Afterdarkreader Wrote: Print out the numerator and denominator and make sure that's correct. I almost guarantee that's your problem
Hi Afterdarkreader,
I've already tried your suggestion and no luck at all. I've tried several solution, also
print(len(set_T4))and even
print (43/487)give as result 0.000000
Hello again,
I've used this version of python and Ipython and the script worked perfectly. any guess?
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.