1 / 9

CP104 - Reminders

CP104 - Reminders. *** Labs start this week! *** Challenge for credit for students with strong previous computer programming background Friday Sept 12, 2:30-4:30 location TBA by Wednesday 4pm, email me if interested, tell me what language you want to write in

Download Presentation

CP104 - Reminders

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CP104 - Reminders • *** Labs start this week! • *** Challenge for credit • for students with strong previous computer programming background • Friday Sept 12, 2:30-4:30 • location TBA • by Wednesday 4pm, email me if interested, tell me what language you want to write in • if writing through accessible learning, you must let them know so arrangements can be made

  2. Computers are everywhere! • 5% are “traditional” • 95% are “embedded”

  3. Hardware vs Software • physical devices composed of: • input units • output units • secondary storage-> stores programs and data (device off) • main memory-> stores program and data (while running) • central processing unit-> runs the program • program required to run the device • set of instructions that the processor follows to perform a task • types • operating system • utility programs • software development tools • application programs

  4. Programming Languages Operating System (Operating System Calls) Application Language Layer High Level Language Assembly Language(Low Level Language) Machine Language Hardware

  5. To run a program … program and data are written in high level language (a) compile program HLL -> LLL -> machine code(b) interpret program HLL -> LLL -> machine code

  6. Programs • Programming Languages • grammar varies by language and is rigid • static • 1,500 [99 Bottles of Beer] • paradigms: procedural, object-oriented, functional, logical • typing: static, dynamic • Natural Languages • grammar varies by language • dynamic • 7,000 • modalities: spoken, signed, written • pitch: intonation, tone The TIOBE Programming Community index is an indicator of the popularity of top 100 programming languages. The World Atlas of Language Structures is a large database of structural properties of languages.

  7. Procedural languages • procedural programs specify a series of computational steps to be carried out • in real life, comparable to writing • recipes, • instructions to build a model airplane, • instructions to construct a bookshelf from a wood working magazine, • instructions to put together “assembly required” furniture

  8. Mac and Cheese • analyze the provided recipe • Consider “Heat the milk in a medium saucepan over medium-high heat until it just comes to a simmer, then turn off the heat and set aside.”

  9. Sample Python program """ ------------------------------------------------------- greetings.py Prompt for name and greet ------------------------------------------------------- Author: Nora Znotinas ID: Email: nznotinas@wlu.ca Version: 2014-09-03 ------------------------------------------------------- """ name = input ( "Please enter your name: " ) print ( "Pleased to meet you " ) print ( name )

More Related