Coder Social home page Coder Social logo

bgpython's Introduction

Hi there! I'm a general enthusiast of computing! I write books and blogs and I teach and code.

🏍️ πŸ₯Ύ πŸ’» πŸ‘Ύ ☠️ πŸ₯ 🎹 🎸 🐐

bgpython's People

Contributors

baguhanta avatar beejjorgensen avatar matildepark avatar pberry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgpython's Issues

Minor errors in chapter's 4 and 5

Hello, I'm pairing your wonderful book with an intro to programming course I'm taking https://cs50.harvard.edu/python/2022/ and wanted to post some of the mistakes (or at least I think they are) I've come across so far. Also, the issues I've come across here are incredibly minor, but I do hope they help nonetheless.

I'm specifically working through this version of the book: https://beej.us/guide/bgpython/html/split/

Chapter 4

4.3 Launching your IDE and Opening a File

In the quoted section that explains what a file and file extensions are you have a line towards the bottom:

As an example, here’s a complete file name and extension:
{.default} hello.py

I could be wrong, but I don't think {.default} is intended here.

Chapter 5

5.7 Converting Between Data Types

In the paragraph that follows for your explanation of the code below you mention storing a return value in y but, the example code doesn't contain a y variable. I think you meant to say b here.

a = "3490"    # a is a string "3490"
b = int(a)    # b is an integer 3490!

print(b + 5)  # 3495

How did that work? We called the built-in int() function and passed it a string "3490". int() did all the hard work and converted that string to an integer and returned it. We then stored the returned value in y. And finally, we printed the value of b+5 just to show that we could do math on it.

5.10 Exercises

Exercise 5.3

In the provided solution for exercise 3 (https://beej.us/guide/bgpython/source/examples/ex_threesumdiff.py), the print statements say "two" instead of "three" when computing the sum/difference of 3 numbers.

# print the sum of x + y + z
print("The sum of the two numbers is:", x + y + z)

# print the difference of x - y - z
print("The difference of the two numbers is:", x - y - z)

Incorrect comment

Incorrect comment in Flow Control:

for i in range(4, 20, 2): # loop from 5 to 9, skipping by 2 each time
    print(i)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.