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.
Student access
Is your university not a partner?
Get access to our courses via Pass Your Math independent of your university. See pricing and more.
Or visit omptest.org if jou are taking an OMPT exam.
Or visit omptest.org if jou are taking an OMPT exam.