..  Copyright (C)  Brad Miller, David Ranum, Jeffrey Elkner, Peter Wentworth, Allen B. Downey, Chris
    Meyers, and Dario Mitchell.  Permission is granted to copy, distribute
    and/or modify this document under the terms of the GNU Free Documentation
    License, Version 1.3 or any later version published by the Free Software
    Foundation; with Invariant Sections being Forward, Prefaces, and
    Contributor List, no Front-Cover Texts, and no Back-Cover Texts.  A copy of
    the license is included in the section entitled "GNU Free Documentation
    License".

.. _simple_python_data:

.. qnum::
   :prefix: data-1-
   :start: 1

Introduction
============

.. index:: value, data type, string, integer, int, float, class, literal, output
    single: triple quoted string

.. _values_n_types:

.. youtube:: vNfCfowr-pQ
    :divid: typesnconvert
    :height: 315
    :width: 560
    :align: left

This chapter introduces several basic building blocks of Python programs:

- literals, like numbers and character strings
- operators, like ``+`` and ``*``
- function calls, which take values as inputs and compute new values
- variables, which save values so they can be used later in the program

These are the basic building blocks that are assembled to create programs that you interact with everyday—from the software running on your smartwatch, to the infrastructure behind the largest websites, and every app running on your phone.

Learning Goals
--------------

* To understand Python's storage model
* To solve problems using the 'accumulator pattern'
* To understand operator precedence
* To distinguish between expressions, values, and printed representations
* To recognize & explain hard coding


Objectives
----------

* Given some sample code identify variables that reference an object of a particular type
* Given a variable of one type convert it to another
* Simulate evaluation of an expression and assignment statement
* Use reassignment to increment a variable (accumulator pattern)
* Get input from a user and convert the input to the appropriate type
* Identify the following types of values: strings, integers, floats, functions
* Recognize valid vs. invalid variable names
* Write an assignment statement
* Update a reference diagram after reassignment
