Skip to content

Files associated with our book Intro to Python for Computer Science and Data Science

License

Notifications You must be signed in to change notification settings

denisecase/IntroToPython

 
 

Repository files navigation

IntroToPython

Developer tooling for IntroToPython

This repository does NOT redistribute example files from the Deitel/Pearson book. Students must obtain the book and its accompanying materials separately.

Note: Due to evolving software and incomplete snippets, not all code will run without additional work. This repo is used to make much of the code runnable or inspectable in VS Code.

Recommended Installations

  • git
  • Python
  • VS Code (and extensions)

Developer

This repository provides a professional working environment; the book examples are added locally.

1. Clone this repo

git clone https://github.com/denisecase/IntroToPython
cd IntroToPython
code .

2. Obtain the textbook example files

3. Install uv

4. Initialize (Just Once)

Use VS Code menu option Terminal / New Terminal to open a VS Code terminal in the root project folder. Run the following commands, one at a time, hitting ENTER after each:

uv self update
uv python pin 3.14
uv sync --extra dev --extra docs --upgrade

# the audio features require additional installs
# start by adding the [audio] packages listed in pyproject.toml:
uv sync --extra dev --extra docs --extra audio --upgrade

If asked: "We noticed a new environment has been created. Do you want to select it for the workspace folder?" Click "Yes".

If successful, you'll see a new .venv folder appear in the root project folder.

5. Run Individual Examples

If you see something like this, click "Install".

Popup

Run a file (e.g., the Roll Die Dynamic simulation):

uv run python examples\ch01\RollDieDynamic.py 100 1

If a window pops up, close the window (or if needed, delete the terminal) to continue.

Open Notebooks and Click Run All. Select the kernel associated with this repo .venv.

6. Save Progress (As Needed)

If you update your copy of the examples, you might want to save progress.

git add -A
git commit -m "update"
git push -u origin main

Citation

This repository does not redistribute textbook example files. If you add the Deitel/Pearson examples locally, please respect the book's copyright and do not publish or redistribute those files.

CITATION.cff

License

MIT

Notice

NOTICE.md

UPSTREAM

UPSTREAM.md

Annotations

Annotations.md

SE MANIFEST

SE_MANIFEST.toml

About

Files associated with our book Intro to Python for Computer Science and Data Science

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published