Skip to content

Include more types of operators in Lesson 7 conditionals #1062

Open
@myatmo

Description

@myatmo

The lesson only mentions comparison operators, and it would be great for students to learn more about other types of operators as well. For example, including Identity Operators such as "is" and "is not", and Membership Operators such as "in" and "not in".

Eg. x = [10, 12.5, 'Unknown']
y = [10, 12.5, 'Unknown']
z = x
if x is y:
print('x and y are the same')
else:
print('x and y are different')

We can showcase why x and y are different even though they contain the same content and the difference between "is" and "==".

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementPropose enhancement to the lesson

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions