1. Introduction: Syntax
Python Syntax: Identifiying variables
Consider the following Python code. This program takes user input and performs some analysis on said input.
number = input()
odd = True
even = False
if number % 2 == 0:
odd = False
even = True
odd = True
even = False
if number % 2 == 0:
odd = False
even = True
Can you identify the variable(s) used in this program?
Unlock full access
Teacher access
Request a demo account. We will help you get started with our digital learning environment.