Angela Yu Python Day 01

  • Each day of course< 2 Hours
  • Download the pledge
  • Log your progress
  • Use multiple screens
  • Download & print python cheat sheet
  • Download 12 rules Learn to Code
  • Download coding notes page
    • Based on Cornell notes
  • Desktop wallpapers for motivation
  • 100 days of code poster
  • Create a band name generator
  • Install pycharm community edition
    • click learn, enable access, restart
    • click link to lessons this course
  • Print(" Text to print") Pycharm shows location of file output of program
    • return code - 0 no errors
  • Strings in single or double quotes
  • stackoverflow.com - good place to search for error messages
  • In pycharm be aware of color of your code.
    • Pycharm underlines errors in red and you can hover to get more info.
    • Pep 8 is guidance for writing Python code& pycharm shows warnings for issues in yellow
  • String manipulation print(" Hello world! \nIn Hello World!") # backslash n = newline
  • Plus to concatenate strings, " Hello"+" Angela"
  • spaces, tabs, indent important when using python

  • Input Function `print(" Hello" + input(" What is your name?"+" ")

  • She used thonny for debugging
  • debug then step into Comments start with#
  • In Pycharm - ctrl-/ toggles commenting a line
  • Variables name= input(" what is your name?") len( string) gives length of a string.
  • Variable Naming
    • Make your code readable Multiple word variables use- user-name
    • Don't use python reserved words
  • Program-Band Name Generator