Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Run a program that shows the version of Python that is running in the code box. Which major version is it?
sys.version tells which Python is running.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
Plan. The module sys knows the version. sys.version is a text with the full version, and sys.version_info.major is the first number.
Answer. The code box runs a current Python 3. The program shows Major version: 3. This is the same language that you install on your computer, so what you learn here works there.
Log in to join the discussion.
Loading…