New answers tagged

1

The databases/small.csv file from the distro code looks like this: name,AGATC,AATG,TATC Alice,2,8,3 Bob,4,1,5 Charlie,3,2,5 The file is 57 bytes and dated 21-Oct-2019. Perhaps redownload the distro code. (Or correct the file in your favorite editor).


1

length is a single value: an integer equal to len(user_input). You cannot iterate through a single value, so Python will throw an error for for i in length. You can either use a standard loop where you keep iterating through the loop until i == length (while i < length... as far as I am aware, Python does not have the standard for loop structure that one ...


1

If you simply use round it will round the expected way (up if it's >= 0.5, down otherwise. Python 3.9.1 (default, Jun 15 2021, 23:45:14) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> a = 4.55 >>> b = 5.45 >>> round(a) 5 >>> round(...


0

You don't need to use from string import strlren (it won't work and not just because it would be strlen). string is a data type and not a library. Python has len built-in, which is what you are looking for. You'll use it as you would strlen in C. Hope that helps. If it does, feel free to mark the check next to my answer to accept it. But if not, let me know ...


Top 50 recent answers are included