Setting Up Python

  1. Installation:
    • Windows: Download the installer from the official Python website and run it.
    • macOS: Use Homebrew (brew install python) or download from the official website.
    • Linux: Use the package manager (sudo apt-get install python3 for Debian-based systems or sudo yum install python3 for Red Hat-based systems).
  2. Verifying Installation:
    • Open a terminal or command prompt.
    • Type python --version or python3 --version to check the installed version.
  3. IDE and Text Editors:
    • IDEs: PyCharm, Visual Studio Code, Spyder.
    • Text Editors: Sublime Text, Atom, Notepad++.

Writing and Running Python Code

Hello, World!:

print("Hello, World!")

Save the file with a .py extension (e.g., hello.py).Run the script from the terminal: python hello.py or python3 hello.py.

Python Shell/REPL:

  • Interactive Python shell allows executing Python commands line by line.
  • Access it by typing python or python3 in the terminal.

Tutorials Deck

TutorialsDeck is striving to provide the best learning material on technical and non-technical subjects.

Languages

Web Technologies

Database

Trending Technologies

© 2024. All rights reserved.

Contact Us @ tutorialsdeck06@gmail.com