Posts by luciana • 57 points
4 posts
-
3
votes2
answers368
viewsQ: Count occurrences of a letter in a string that repeats several times to a character limit
In this problem I have to count the number of times the letter appears 'a' in string 'a' range 1000000000000, only that I have run time error when it is a very high number like this. for example: if…
-
1
votes1
answer38
viewsQ: How to use for comparing a specific index?
In function bonAppetit, i want to pick up only the content k (in the case k=1 and the value is 10), and see if that number is less than or equal to b. Only my program is running the whole list. def…
-
-1
votes1
answer88
viewsQ: error: EOF when Reading a line
I need to round the notes to the next multiple of 5, if it is greater than 38 and the difference is less than 3. However, when I am going to submit the code to me d[and the error: EOF when Reading a…
-
0
votes1
answer40
viewsQ: problem with None
I’m doing an exercise here and the desired output would be Yes in this case but it’s returning me None. Could anyone help me? vlw def alphabet (s,t,k): for i in range(0,len(s)): if s[i] != t[i] or s…