Python Forum
Request for little help (for tree coding lines)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request for little help (for tree coding lines)
Dear Python programmers,
I am a student of computer science, and am now applying for an online course in data science. In order to do this properly, I have to answer 3 questions. Since I am a complete beginner in Python, I would need your help (I have experience in Java).

I am using this online plattform for Python:
And I have to answer the following 3 questions:
- what is returned when I evaluate [n for n in range(10) if n % 2]?
- what kind of error is returned by the following code: (e.g. NameError, ValueError, IOError, etc.) def my_func(n1, n2): return n1 + n2 my_func(1, 2, 3)
- What is returned by datetime(1970, 1, 1).strftime('%Y-%d-%B') in Python?

I am trying to use the plattform above (at tutorialspoint), but still am not doing it proper and am not sure how to use it in order to answer these 3 questions. Please help me.
Thank you in advance. Heart
1. If you are not able to solve this yourself, without the need to run the code - maybe this course is not for you. These are really basic stuff and if you are not able to solve - you will probably have hard time following the course. Take a python beginners course as per-requisite for this course.
2. Despite 1, you can run these code snippets/lines and see what you get, right?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

You should not use because it is version 2.7.13. Version 2 is deprecated.
On this forum you find in the menu bar: Interpreter. It is Python version 3.2. You had better use that one.
Dit you find the answers to your questions by executing them?

Possibly Related Threads…
Thread Author Replies Views Last Post
  coding request patirajesh07 4 823 Aug-14-2019, 05:35 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020