Skip to content

Variables and Assignment - String/Integer Concatenation #711

@bwright23ou

Description

@bwright23ou

What is the problem?

Hi,
I wanted to point to a potential issue with the curriculum on concatenating the 'age' and 'first_name' variable. In the following code block
print(first_name, 'is', age, 'years old')
an error is returned due to the mix of data types. I want to recommend potentially writing the age variable as a string to demonstrate concatenation, without jumping too quickly into the different data types, and how to mitigate a TypeError.

Location of problem (optional)

https://swcarpentry.github.io/python-novice-gapminder/02-variables.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions