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.