Quizzma Latest Questions

Usually, the first line of a Python program is a special comment indicating which version of Python you’re using. What should this comment look like?

Usually, the first line of a Python program is a special comment indicating which version of Python you’re using. What should this comment look like?

A. # Python 3.8
B. #!/usr/bin/env python
C. // Python 3.8
D.




Leave an answer

Leave an answer

What is the capital of Egypt? ( Cairo )

1 Answer

  1. The correct answer is B. #!/usr/bin/env python.

    This line is called a “shebang” and it indicates which interpreter should be used to execute the script. It enables the script to be run in environments where the Python interpreter is located in different paths. Option A is just a comment and does not instruct the system on how to execute the file, while option C uses the wrong comment syntax for Python. Good luck with your studies!

Related Questions