Hi rebelCoder I believe there is an easier way to solve #3 Loops and conditions start =100 end = 200 result = [x for x in range(start+1,end,2)] print(sum(result)) Where "range(start+1,end,2)" skips even numbers while going from start+1 to end. What do you think?
You are right. While it is not necessarily 'easier' way, but it is one of the ways for sure. If you take a look at "Solutions" section as I mentioned at the end of the video, you will see so many different ways. So there is no point of listing all the ways we can solve this, as there are way to many. In our videos we will try having a balance between "Easy-To-Read/Understand" and "Very Pythonic". I want to make sure people, who are just picking up Python, can still understand the code, as it is written in logical steps and uses operators like % in our case. We will come across some crazy Python code later on, where we will optimize 5-7 lines into 1-2. You gonna love it! But we will try keeping the balance, so our code is not just for experienced Python programmers.
A good practice right there. That +1 for start is tricky and is causing the problem. Try using debugger in VSCode and step through and you will see the problem. We will cover debugger separately. It is a necessary tool for our more complex algorithms ahead.
It is hard to say way this is happening, without looking at some screenshots, as we all have different operating systems, python version, editors. I strongly recommend to NOT use PyCharm if you are a total beginner. PyCharm is an amazing code editor, but it is too complex for beginners. Too many people had issues running even a simple code on PyCharm. Try using the simple, clean code editor I use in my videos: VSCode or VSCodium. This way you can focus on learning programming, ad not fighting your code editor.
Hey! You are the first to report this. Read/Write code is very simple Python , so I have a feeling you need to double check your code. Try looking up other videos about reading and writing files. Or join our chat and provide screenshots and error codes you are seeing.
I love your veido, it's amazing, especially rosalind, learning python to solve interesting and practical question is meaningful.
Actually, I think in the section of working with files, we add start = 1 in enumerare function, this is much better to understand.
Whoever made this yt video needs some fire head for real thanks for the help i couldn’t do this on my own no matter how long I tried
Glad I could help
@@rebelScience imusing google collab for my assignments and anytime i try and use a file it wont load the code
any suggestions?
Hi rebelCoder
I believe there is an easier way to solve #3 Loops and conditions
start =100
end = 200
result = [x for x in range(start+1,end,2)]
print(sum(result))
Where "range(start+1,end,2)" skips even numbers while going from start+1 to end.
What do you think?
You are right. While it is not necessarily 'easier' way, but it is one of the ways for sure. If you take a look at "Solutions" section as I mentioned at the end of the video, you will see so many different ways. So there is no point of listing all the ways we can solve this, as there are way to many. In our videos we will try having a balance between "Easy-To-Read/Understand" and "Very Pythonic". I want to make sure people, who are just picking up Python, can still understand the code, as it is written in logical steps and uses operators like % in our case. We will come across some crazy Python code later on, where we will optimize 5-7 lines into 1-2. You gonna love it! But we will try keeping the balance, so our code is not just for experienced Python programmers.
ok, just found my code doesn't work with start number that's odd! :'(
A good practice right there. That +1 for start is tricky and is causing the problem. Try using debugger in VSCode and step through and you will see the problem. We will cover debugger separately. It is a necessary tool for our more complex algorithms ahead.
Nice video man but please, I thought the other way for summing odd numbers was range(start, end, count)🥺
What program are you using?
Didn't this channel have other videos? What happened to them?
Yes. They are coming back soon.
I did the same on Pycharm but i didddnt get the answer :(
me too. please reply if you find out what the problem is
It is hard to say way this is happening, without looking at some screenshots, as we all have different operating systems, python version, editors. I strongly recommend to NOT use PyCharm if you are a total beginner. PyCharm is an amazing code editor, but it is too complex for beginners. Too many people had issues running even a simple code on PyCharm. Try using the simple, clean code editor I use in my videos: VSCode or VSCodium. This way you can focus on learning programming, ad not fighting your code editor.
Hey can you solve ..mortal rabbit fibonaci series as well?
Which IDE is this?
This one: czcams.com/video/81Eb_YXmV4g/video.html
@@rebelScience thanks so much!
can you do a rabbit fibonacci problem?
I already did. Check out other Rosalind videos.
@@rebelScience yes i checked it..it helpd me alot Thanku so much for the efforts..It means alot💘
@@xamaniftikhar7867 you are welcome. More cool things coming soon.
Hi rebelCoder, the reading and writing files problem is not working.
Hey! You are the first to report this. Read/Write code is very simple Python , so I have a feeling you need to double check your code. Try looking up other videos about reading and writing files. Or join our chat and provide screenshots and error codes you are seeing.
@@rebelScience I even followed your code given in your gitlab account, yet I keep getting an error.
Well, how can we help you if you are telling us what error you are getting ?
@@rebelScience i'll take a screenshot and send it to you via chat
mine isn't working either