Homework assignments


Homework grades

Toggle the grades »

Max points: HW01 - 50, HW02 - 40, HW03 - 55, HW04 - 50, HW05 - 75,
    ID     SC     HW01     HW02     HW03     HW04     HW05     %     GitLab
1234567890 1.00 50 40 55 50 72 ok

HW08

Homework cancelled


HW07

Toggle the assignment text »

Problems:

HW7, [ 52K ], last updated November 01, 2016


HW06

Toggle the assignment text »

Reading:
Agustín Cernuda del Río, How Not to Go About a Programming Assignment

Reading:
CS50 programming style guide

Video:
N. Hardison, CS50, Libraries

Video:
N. Hardison, CS50, GDB

Video:
N. Hardison, CS50, Binary

Problems:

HW6, [ 61K ], last updated October 18, 2016

Code for Problem 4 HW6, [ 352 ], last updated October 16, 2016


HW05

Toggle the assignment text »

Video:
R. Bowden, CS50, Pointers

Video:
R. Bowden, CS50, Structs

Video:
J. Jozwiak, CS50, Typecasting

Video:
N. Hardison, CS50, ASCII

Problems:

HW5, [ 73K ], last updated September 29, 2016


HW04

Toggle the assignment text »

Video:
J. Jozwiak, CS50, Precedence

Video:
R. Bowden, CS50, Compilers

Video:
D. Dicuircio, CS50, Scope

Video:
J. McCormick, CS50, Local and global variables

Problems:

HW4, [ 58K ], last updated September 22, 2016


HW03

Toggle the assignment text »

Video:
T. MacWilliam, CS50, Loops

Video:
R. Bowden, CS50, Arrays

Video:
J. Jozwiak, CS50, Typecasting

Video:
N. Hardison, CS50, Functions

Problems:

HW3, [ 64K ], last updated September 27, 2016


HW02

Toggle the assignment text »

Reading:
Virtualization

Video:

J. Leek, Command line interface
Local copy of the video and the lecture notes posted online on September 01, 2014; on-campus access only

Video:

T. MacWilliam, CS50, C programming: Code Style

Video:

V. Shekhawat, CS50, Boolean Values

Video:

V. Shekhawat, CS50, Variables

Problems:

HW02, [ 58K ], last updated September 07, 2016

Programming:

The following fully functional 'chromosome-shaped' program is one of the winners of 2014 International Obfuscated C Code Contest . What does it do?

#include <stdio.h> #define TA q=/*XYXY*/ #define/*X YXY*/CG r= void p(int n,int c){; for(;n--;) putchar(c) #define Y( z)d;d=c++\ %2<1?x=x*4 +z,c%8>5?\ x=x?p(1,x), 0:x:0:0;d= #define/*X YX*/C Y(1) #define/*X YX*/G Y(2) ;}int(*f)( void),d,c, #define/*X YX*/A Y(0) #define/*XY*/AT int\ m(void/**/){d= #define/*XYX*/T Y(3) #define GC d; return\ 0;}int(*f) (void )=m; x,q,r; int main(){if( f)f();else {for(puts( "#include" "\40\"pro\ g.c\"\n\n \101T"+0); d=!d?x=(x= getchar()) <0?0:x,8*8 :d,TA++c%8 ,TA(1+7*q- q*q)/3,r=c *15-c*c-36 ,p(r<0?!q+ 4:r/6+!q+4 ,32),q||x; c%=16)q?p( 1,"ACGT"[x /d&3]),p(q ,126),p(1, "TGCA"[x/d &3]),d/=4, p(001,10): puts(c%8?\ "CG":"TA") ;puts("GC" );}return 0;}/**/

Hints

  • Copy and save the code of the program to a file, say prog.c
  • Compile the code as usual:
    clang -Wall prog.c -o prog
  • Run the program as following:
    echo 12345 | ./prog


HW01

Toggle the assignment text »

Reading:

Mike Vanier, Scalable computer programming languages

Based on the information from the article, what language would you you choose for the first programming course?

Data analysis:

Popularity of computer programming languages

Look for the Long term trends graph and Very long term history table

Data analysis:

XYZ dominates supercomputers as never before

For the latest data visit TOP500 and chose Operating System Family as a category for the search

Problems:

HW01, [ 56K ], last updated August 29, 2016

Software:

Download and install: VirtualBox

Download and import: physics 2200 virtual appliance, ca 4GB, last updated Sep 1, 2016.

MD5 Checksum:     58BFDDE92789CD324DBD980816A9ABD0
SHA-1 Checksum:   AD5CF6E7A5DC241B74490277D12F84F2FE21776A
SHA-256 Checksum: 5E130F959479A9E9EF857BDD21342AA3B039568C9D9706C48089540D019BAF47
SHA-512 Checksum: BA6960EB03162DF4ECE9FDDD3896874D552563EA55AADD31E9A3CAC4CF91EE5F173C597FB14480F7F3C0E6732A234E3229698C8B89D8445291EB53B4EA739B78
              

Or, download and import: physics 2200 virtual appliance 32 bit, ca 4GB, last updated Sep 8, 2016.

MD5 Checksum:     C520BC1865AC4B28178CA3AF1E84A61F
SHA-1 Checksum:   194ECA390EDEDB6C13A7160317F64F9790FFA7B4
SHA-256 Checksum: 52F9A51F5DC23628D9932D28B646340F36D329ABFA0183F1572CC957DFB67956
SHA-512 Checksum: AFA305BFCBBC0007F00F72991370AA045A7BE90EBC6A38F30A45F48C32E03D628A89D8D6A6FEB69443B2C68299F063AEF521874B1F24502909A1501FBE1EE9E8
              

A checksum is a small-size datum used for the purpose of detecting errors which may have been introduced during a data file transmission or storage.

The actual procedure which yields the checksum, given a data input is called a checksum algorithm. A good checksum algorithm will usually output a significantly different value, even for small changes made to the input.

Checksum tools are installed on Mac and Linux by default. A Windows version of a checksum program is available at https://raylin.wordpress.com/downloads/md5-sha-1-checksum-utility/


Homework guidelines