Last answered:

20 Mar 2024

Posted on:

29 Dec 2023

0

Q10: why the solution in Q10 give me an error??

why the solution in Q10 give me an error??

 

2 answers ( 0 marked as helpful)
Instructor
Posted on:

03 Jan 2024

0

Hey Amal,


Thank you for reaching out.


I can't immediately find the issue with your code. Since your source file is very long (more than 500 lines), it's possible that you've left some previous code uncommented. My suggestion is that you create a new source file, paste the solution to question 10 there, and run the code.


Let me know if you still experience this problem.


Kind regards,

365 Hristina

Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

20 Mar 2024

0

its running end to end for me, please crosscheck again:

n=100
evens=[]
odds=[]
for i in range(n+1):
    if not i%2:
        evens.append(i)
    else:
        odds.append(i)
print(f'the evens are {evens}')
print(f'the odds are {odds}')

Submit an answer