cs 105 intro to computing
play

CS 105: INTRO TO COMPUTING, NON-TECHNICAL Max Fowler (Computer - PowerPoint PPT Presentation

CS 105: INTRO TO COMPUTING, NON-TECHNICAL Max Fowler (Computer Science) https://pages.github-dev.cs.illinois.edu/cs-105/web/ June 14, 2020 Video Series One Topics What are the goals of this course (and why care?) A few notes about the


  1. CS 105: INTRO TO COMPUTING, NON-TECHNICAL Max Fowler (Computer Science) https://pages.github-dev.cs.illinois.edu/cs-105/web/ June 14, 2020

  2. Video Series One Topics  What are the goals of this course (and why care?)  A few notes about the course  Computer and Programming Language Basics  Types and Type Conversion  Input vs Print

  3. Goals

  4. What is Computer Science, anyways? “Computers are to Computer Science what telescopes are to astronomy” – Edsger Dijkstra  CS is concerned with understanding…  What is computable  How to [specify computation, perform computation, communicate between computers] in the [fastest, most reliable, most secure, cheapest/lowest resource] way  How to help humans solve problems with computers

  5. What are the course's learning objectives? Given a small (5-10 line) Python program, students should be able to execute the 1. program in their head and correctly predict the outcome. Given a small (5-10 line) Python function, students should be able to provide a 2. natural language description of what the function does. Students should be able to write short (5-10 line) Python programs, including the 3. use of variables, expressions, conditionals, loops, and functions. Students should be able to use built-in Python data structures including strings, lists, 4. and dictionaries. Students should be aware of intermediate programming concepts including modules, 5. exception handling, user-defined types (classes) Students should be capable of using basic and intermediate spreadsheet 6. operations (including INDEX, MATCH, and VLOOKUP), writing simple HTML documents, and performing simple data analysis tasks.

  6. What is "Programming?"  A series of instructions that can be carried out by a computer  A startlingly useful skill  A skill that is useful even to be "aware" of http://www.programmingbasics.org/en/beginner/img/commands4.png

  7. Other terms for Programs But not "codes"!!  Programs  Software  Applications https://www.geeksforgeeks.org/caesar-cipher-in-cryptography/  Code https://twitter.com/m4tt/status/1138029336198561792

  8. Programs do many things

  9. Three parts of a program  Algorithms  A step-by-step process for achieving a result  Often written in pseudo-code  Ignore details  Increase generality  Programming  Express the commands in a form the computer understands  Testing and Debugging  Make sure the program works  And works correctly  Every time you run it

  10. Why do we need programming languages?  "I saw the man in the park with the telescope"  Who had the telescope?  Who was in the park?  "With my telescope, I saw a man standing in a park…"  "I saw a man with a telescope standing across the street in the park…"  "While I was in the park with my telescope, I saw the man …"

  11. Programming languages -> exact and unambiguous  Everything has a precise FORM (syntax) and precise MEANING (semantics)  Syntax: Rules of what are acceptable programs  Semantics: Rules specifying WHAT a program does

  12. This is all are largely arbitrary  Humans and programming languages are human made  If you haven't seen this before, there isn't any reason why you should know any of it right away  Easiest bugs to find? The ones you've made before  No shortcut around mistakes  Even experts make mistakes…

  13. Video Question – what is an algorithm?

  14. Notes about the course

  15. Do…  Give the course website a read – particularly the syllabus and announcements!  Sign up for Piazza, get access to Prairie Learn, buy the book, etc. -> details in the first announcement  Check the course calendar – the due dates are already up for the summer!

  16. What is known about teaching and learning  No one can pay attention for 90 continuous minutes  Video snippets, rather than "a video" or "two videos"  Attention span? About 10-15 minutes  Watch with some focus  "Time on task" is a primary factor of how much gets learned  The course is intended to give you productive things to do  Doing is better for learning than reading or listening  Expending mental energy enables things to "stick"

  17. What is known about teaching and learning  You can most efficiently learn…  Things related to what you know  Things that are only slightly harder than the things you can already do  Long term retention comes from repeated, distributed practice  Best retention – a cycle of forgetting and re-learning  Best spaced in time: cramming will not produce long term retention

  18. What is the homework policy in CS 105?  Learning benefits from collaboration…  The extreme end – hire a stranger to tell you what to type into homework

  19. Formative vs Summative Assessment  Practice/Formative Assessment  Intended for learning, self-evaluation  In 105, this is the homework, reading activities, and labs  You may get help from ANYONE – but you need to type your answer  Summative Assessment  Evaluate how much has been learned  In 105 – The quizzes and the final  Has to be done by yourself (with limited materials)

  20. What are the quizzes and exams?  7 quizzes using the Computer-Based Testing Facility's online proctoring (every Monday from 6/22 onward)  Sign-up with CBTF proctoring https://cbtf.engr.illinois.edu/sched  50 minutes  The final – one three hour "mega quiz" (although not strictly "three times" as large), time TBD

  21. Video Question – what is the homework policy?

  22. Computer & Programming Language Basics

  23. The major parts

  24. Computers…  How many instructions a second can computers execute?  Hundreds? Thousands? Millions?  GHz – billions of things a second!  Are computers "smart"?  No, they're dumb – and do exactly what you tell them to do

  25. Computers are dumb  On a "Linux" system  rm – rf / removes everything in "root", the / directory  Imagine deleting everything on your machine and not https://jerrygamblin.com/2016/10/16/rm-rf- still-works-on-osx/ having an undo button…

  26. Computers run low-level instructions  Computers don't "Play Despacito"  Instead, they…  Move a number from one storage to another  Add two numbers  Check if one number is larger than another  Go to a different place in code  Programming at this level…  Is tedious, error prone  Needs a LOT of code to do anything  Isn't portable – each processor type has their own "stuff"

  27. High-level Languages (like Python!)  Productive, safer, portable  Why Python? Super useful language, gentle learning curve  Once you've learned a language, it is easier to learn others!  We use Python 3 (not Python 2)  Interpreted language

  28. Where does Python run on the computer? 28 A B C D E

  29. Video Question – which of the following is NOT something a computer does as an instruction?

  30. Types and Type Conversion

  31. Python values have types 31  Early into the class, we'll meet two types:  Strings: e.g., our string literals like “Hello CS 105!”  Integers: whole numbers of arbitrary precision  You can ask a value what its type is using: type( expression )  You can convert between them with str() and int()  It is important that you keep track of the types of your values!

  32. Video Question – what is the type of x if x is assigned using x = 23?

  33. Input vs Print

  34. Input vs print  input() gets user input (from a prompt) and returns a string  We can use input() empty OR with a prompt  print() prints OUTPUT to the screen – usually the same screen where we get our input from!  What if I want to get a number input?

  35. Video question on print  Assuming there is a variable value with the value 7, which of the following statements prints: count = 7 A) print(“count =” value) B) print(“count =”, end=“value”) C) print(“count =”, value) D) print(“count =” + value) E) print(“count = $value”)

Recommend


More recommend