1. Introduction: Syntax
Python Syntax: Identifiying variables
Consider the following Python code. This program takes user input and performs some analysis on said input.
sentence = input()
correct = False
if sentence[0].isupper() and sentence[-1] == ".":
correct = True
correct = False
if sentence[0].isupper() and sentence[-1] == ".":
correct = 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.