Coding with Python

Learning Standards (What are we learning)

Assignment Workspace (What to use for writing and running code)
    later on will use pycharm,  others include -  online ide

Textbook CS11-> Think Like CS  CP11->  CSP:Big Ideas   (Where can I learn about the language and how to use it)
                   alternatives -> Hard Way  Practical Programming  Python for Everybody

Python Reference Tutorial  https://www.python-course.eu/
                                                                         
Sources of challenges (Applying creativity and language knowledge to create solutions)

Visualize Code and get extra help (Watch what is happening "under the hood" "behind the scenes")

Unicode Character Sets

While learning to program can be fun, it does require some work on your part. I will be your guide, so that you can learn on your own; however, you will not learn if you do not write your own programs. This is important enough that you should take it as a rule to follow.

Rule # 1 Learning about computer programming is like learning to play a musical instrument: you have to do it, not simply read about it. The second thing you need to know is the most important, best-kept secret for writing good computer programs.

Rule # 2 Write your computer programs to make them easy for people to read. That's right, write your computer programs so that other people, just like you, would find them easy to read on their own. Yes, computer languages are designed to allow you to communicate with computers, just as human languages have evolved to allow humans to communicate with each other. But computer languages, which are much simpler than human languages, are often used by programmers to share their work with other programmers. Just as you can improve your English writing skills by reading well-written novels, you can improve your programming skills by reading well-written computer programs. However, you will still need to write your own programs to learn how to do it.

AN APPROACH TO SIMPLE PROGRAMS

1) open a code file ( .py for python)

2) add comments (use #  in python)

#
# Who is creating this?

# Describe what you are doing ?

# How will you know it is working ?

# Describe the steps as best you can by 

#   a) Break this down describing what your doing as a series of actions ?

#   b) Identifying actions that are repeated ?

#   c) Describing these actions as code [computer language] ?

# Can the code be expressed in a simpler way?


Demonstrate the programming process.

  •  - many small steps are better than a few large ones
  • - a step involves adding code and testing it
  • - code may need to be undone and/or refactored (changed to do the same thing in a better way)
  • - making errors is common for experienced programmers also
  • - error messages are not always clear
  • - online documentation is often very useful
  • - while systematic programming is most often a non-linear process.

after code works
  • make small changes - what breaks it ?
  • how could you make it better - give it a go.