Difference between revisions of "CSC111 Class Page 2014"
(→Second Half) |
(→Second Half) |
||
Line 475: | Line 475: | ||
** A word about the [[Media:CSC111_Quiz6.pdf|quiz]] | ** A word about the [[Media:CSC111_Quiz6.pdf|quiz]] | ||
** A word about the Wolfram language<br /><center><videoflash>_P9HqHVPeik</videoflash></center><br /> | ** A word about the Wolfram language<br /><center><videoflash>_P9HqHVPeik</videoflash></center><br /> | ||
+ | ** Price of a bit | ||
+ | *** {| | ||
+ | ! technology | ||
+ | ! cost | ||
+ | ! speed | ||
+ | |- | ||
+ | | RAM: | ||
+ | | 8GB @ $80 ( 0.01 cents/MB ) | ||
+ | | 6,000 to 17,000 MB/s | ||
+ | |- | ||
+ | | SSD | ||
+ | | 256GB @ $190 (0.0007 cents/MB) | ||
+ | | 600 MB/s | ||
+ | |- | ||
+ | | Hard Disk | ||
+ | | 2 TB @ $160 ( 0.00008 cents/MB) | ||
+ | | 90 MB/s | ||
+ | |} | ||
+ | |||
** Working with files. Files are an essential part of a computer, and they are maintained by the operating system. | ** Working with files. Files are an essential part of a computer, and they are maintained by the operating system. | ||
** How hard disks work:<br /><center><videoflash>Wiy_eHdj8kg</videoflash></center><br /> | ** How hard disks work:<br /><center><videoflash>Wiy_eHdj8kg</videoflash></center><br /> |
Revision as of 09:18, 31 March 2014
--D. Thiebaut (talk) 09:58, 7 January 2014 (EST)
Contents
Prof and TAs
Dominique Thiébaut email |
|
To see when and where TAs are available this week, click here.
Weekly Schedule
First Half
Week | Topics | Reading |
Week 1 1/27 |
x = 3 name = "hello"
|
|
Week 2 2/3 |
|
|
Week 3 2/10 |
|
|
Week 4 2/17 |
(advance the movie to 7 minutes and 10 seconds)
|
|
Week 5 2/24 |
file = pickAFile()
sound = makeSound( file )
blockingPlay( sound )
|
|
Week 6 3/3 |
|
|
Week 7 3/10 |
No Quiz this weekend (3/8, 3/9)!
Youyou's cats, created during Lab 7 Session 1
|
|
Spring Break
Second Half
Week | Topics | Reading | ||
Week 9 3/24 |
|
| ||
Week 10 3/31 |
|
technology | cost | speed |
---|---|---|---|---|
RAM: | 8GB @ $80 ( 0.01 cents/MB ) | 6,000 to 17,000 MB/s | ||
SSD | 256GB @ $190 (0.0007 cents/MB) | 600 MB/s | ||
Hard Disk | 2 TB @ $160 ( 0.00008 cents/MB) | 90 MB/s |
- Working with files. Files are an essential part of a computer, and they are maintained by the operating system.
- How hard disks work:
- The evolution of hard disk technology. Examples
- The evolution of programming languages.
- How are characters stored on disk (and in memory)?
- ASCII Table (American Standard Code for Interchange of Information)
- UTF-8 ((Universal Character Set) Transformation Format)
- Typical file operations:
- open file for reading
- read whole file into a variable (string or list)
- close file
- or
- open file for writing
- write one or several variables to file
- close file
- Examples:
- Write
# write some variables to file name = "Smith College" address = "1 Elm st., Northampton, MA 01063" file = open( "college.txt", "w" ) file.write( "%s\n" % name ) file.write( "%s\n" % address ) file.write( "Amherst College\n" ) file.write( "Amherst, MA, 01002\n" ) file.close()
- Read
# read the same file back and print all the lines file = open( "college.txt", "r" ) for line in file: print( "line =", line.strip() ) file.close()
- What is the file path?
- Wednesday
- Friday
||
- Reading
- Read Chapter 7 on Files and Exceptions. We are going to concentrate on text files, reading text files and writing text files, and on handling exceptions. You may skip Sections 7.3 and 7.4.
|- style="background:#ffffff" valign="top"
| Week 11
4/7
||
- Monday
- Wednesday
- Friday (Visit by admitted students)
||
- Reading
|- style="background:#eeeeff" valign="top"
| Week 12
4/14
||
- Monday
- Wednesday
- Friday
||
- Reading
|- style="background:#ffffff" valign="top"
| Week 13
4/21
||
- Monday
- Wednesday
- Friday
||
- Reading
|- style="background:#eeeeff" valign="top"
| Week 14
4/28
||
- Monday
- Wednesday
- Friday: Final Take-Home EXAM
||
- Reading
|}
Links and Resources
All Demo Programs
- A selection of programs created in class can be found here
On Line Python books
- disocovermagazine.com blog. Check out the answers posted by many readers. They contain some interesting links that you may find useful!
Python keywords
- The list of all the reserved words of the Python language
- and del for is raise assert elif from lambda return break else global not try class except if or while continue exec import pass yield def finally in print
Linux
- Getting Started with Linux (from U. North Carolina, Chapel Hill)
- Intermediate Linux (from U. North Carolina, Chapel Hill)
- A good Emacs tutorial
- Emacs Quick Reference
Misc
- If you decide to work in pairs for the homework assignments, you need to follow the protocol for 'pair programming' as discussed in this article.
- Video talks on Python:
- All the programs of Zelle's Python textbook
- a video of digital horses: what we can do with lists of objects!
Software
- Installing and using the Secure Shell Client on a Windows PC.
- Using SSH on Windows, Linux, or on a Mac with OS X
Class Videos
(The tables below were generated by this Python program.)
Back To Main Page