Programming Challenge Labs Begin: Enhance Your Skills This Week!
Calling all students with a strong background in computer programming! Join us for our upcoming Programming Challenge Labs starting this Friday, September 12, from 2:30 PM to 4:30 PM, with the location to be announced. If you're interested, please email me by Wednesday at 4 PM with your preferred programming language. Note: If you require accessible learning arrangements, inform us as soon as possible. Dive into the world of programming languages, software, and the intricate relationship between hardware and software. Don't miss this opportunity to sharpen your skills!
Programming Challenge Labs Begin: Enhance Your Skills This Week!
E N D
Presentation Transcript
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
Computers are everywhere! • 5% are “traditional” • 95% are “embedded”
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
Programming Languages Operating System (Operating System Calls) Application Language Layer High Level Language Assembly Language(Low Level Language) Machine Language Hardware
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
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.
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
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.”
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 )