CSE 101: Introduction to Computers
Homework #2
Spring 2017
Assignment Due: March 24, 2017 by 11:59 PM
Assignment Objectives
This assignment will test your ability to design, code, run and test origina
CSE 101: Introduction to Computers
Fall 2016
Laboratory Assignment 8
This assignment is due by 11:59 PM on Friday, November 4. Submit your .py file through Blackboard.
In this week's lab, we will prac
CSE 101: Introduction to Computers
Summer 2015
Homework 1
This assignment is due (on paper) within the rst 10 minutes of class on Thursday, June 4.
Please write neatly or type your answers; submission
CSE 101: Introduction to Computers!
Spring 2015
Laboratory Assignment 10!
!
!
!
This assignment is due by 11:59 PM on Sunday, May 3. Submit your .java le through Blackboard.!
In today's lab, you will
CSE 101: Introduction to Computers
Summer 2015
Homework 2
This assignment is due (on paper) within the rst 10 minutes of class on Tuesday, June 30.
Please write neatly or type your answers; submission
def isearch(a,x): #a[] is the list, x is the target element
for i in range(len(a):
if a[i] = x:
return i
return None
def isearch_while(a,x):
i=0
while i < len(a):
if a[i] =x:
return i
i+=1
return None
Summary for midterm 1
CSE101 2018 Spring
Commands and Expressions
String
a sequence of characters
Hello, world!
Integer
whole numbers
5
Floating-point
real numbers
12.36
Boolean
True OR False
Arit
CSE 101: Introduction to Computational and Algorithmic Thinking
Exam 1 Study Questions
Programming Questions: Short Answer
1. Give the output of each of the following short Python programs. Note that
import math
#functions
def sift(k,a): #k is a prime number
for i in range(2*k,len(a),k):
a[i]=None
def non_nulls(a):
res=[]
for x in a:
if x is not None:
res.append(x) #append: a method to add sth to
CSE 101: Introduction to Computational and Algorithmic Thinking
Exam 1 Study Questions
Programming Questions: Short Answer
1. Give the output of each of the following short Python programs. Note that
Write afunclion dc_encrypt () that takes the following arguments, in this order:
1. plaintext: an original, plaintext string to be encrypted
2. filename: a le that contains the 6 x 6 encryption key
Yo
P_pher
For the remainder of this assignment you will be implementing an encryption algorithm we will call The Double
Cipher. The algorithm itself is described in detail in Part V. Before we get there
Part IV: The Double Cipher: Map Coordinates to Character (10 points)
Write a function map_coords_to_char that takes one argument: filename, which is a le that will be used
to build the second of two d
Part I: The UplDown Cipher: Encryption Algorithm (20 points)
Write afunction updownncrypt cfw_) that takes the following arguments, in this order:
a plaintext: a plaintext string containing letters, d
Part VI: The Double Cipher: Decryption (20 points)
Write a function dc-decrypt cfw_) that takes the following arguments, in this order:
1. encrypted: an encrypted message to be decrypted
2. filename:
CSE 101 Midterm 1 (Practice Version) KEY
Please place ALL of your final answers on the answer sheet that you were given at the start of the
exam. Answers written on this question packet will NOT be g
#
#
#
#
#
Lab 3, Problem 1 Starter Code
CSE 101 (section 01), Fall 2017
Your Name: Hongbo Jiang
Your SBU ID: 110367008
def reflect(myList):
newList = []
for i in range(len(myList):
newList.append(myLi
Part II: The UpIDown Cipher: Decryption Algorithm (20 points)
Write a function updown_decrypt cfw_) that takes the following arguments, in this order:
0 encrypted: ciphertext that was generated from p
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Lab Assignment #7
Fall 2017
Assignment Due: October 27, 2017 by 11:59 pm
Assignment Objectives
To become comforta
CSE 101 Midterm 2 (Practice Version)
Fall 2014
NAME (please print legibly):
Your University ID Number:
The name of the student to your LEFT:
The name of the student to your RIGHT:
Please leave at lea
CSE 101: Introduction to Computers!
Spring 2015
Laboratory Assignment 5!
!
!
This assignment is due by 11:59 PM on Sunday, March 29. Submit your .py le through Blackboard.!
Some Web sites impose speci
CSE 101: Introduction to Computers!
Spring 2015
Laboratory Assignment 7!
!
!
!
This assignment is due by 11:59 PM on Sunday, April 12. Submit your .py le through Blackboard.!
In today's lab, we will c
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Homework #5
Fall 2017
Assignment Due: November 26, 2017 by 11:59 pm
Assignment Objectives
For this homework you w
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Homework #4
Fall 2017
Assignment Due: November 3, 2017 by 11:59 pm
Assignment Objectives
To become comfortable wr
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Lab Assignment #8
Fall 2017
Assignment Due: November 4, 2017 by 11:59 pm
Assignment Objectives
This lab will give
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Course Project (EXTRA CREDIT)
Fall 2017
Assignment Due: December 10, 2017 by 11:59 pm
Assignment Objectives
For t
CSE 101: Introduction to Computational and Algorithmic Thinking
Stony Brook University
Homework Assignment #2
Spring 2018
Assignment Due: February 16, 2018 by 11:59 pm
Assignment Objectives
This homew