CSE201, Spring 2012
Homework Set# 08
Solution
1. The Python function randPicture(row, column) in the sample file,
generates a row-pixel by column-pixel picture of random pixels.
a. Use randPicture(row, column) and generate a 3-pixel by 3-pixel
picture.
>
CSE 201, Spring 2012
Homework Set # 04
Solution
1. Web-search and report on following terms
a. Malware
Malware, a portmanteau of the words malicious and software, is a
catch-all term for any software designed to run on a computer
without permission of the
CSE201, Spring 2012
Homework Set# 09
Solution
1. Compress the following string using Lempel-Ziv encoding. Explicitly
mention what should be included in the compressed file:
761835155650884909989859982387345528331635507647918535893226185489
632132933089857
CSE 201, Spring 2012
Homework Set # 02
Solution
1. Consider the following random experiment. You toss a fair coin 6 times in
a row, for each Head you make a dollar and with each Tail you lose a
dollar.
a. What is the probability of having made no money at
CSE 201, Spring 2012
Homework Set # 06
Solution
1. Using the method discussed in class, convert (long hand)
a. Decimal (that is, base 10) 6060 to binary
6060 = 3030 x 2 + 0
3030 = 1515 x 2 + 0
1515 = 757 x 2 + 1
757 = 378 x 2 + 1
378 = 189 x 2 + 0
189 = 9
CSE 201, Spring 2012
Homework Set # 03
Solution
1. Runthefollowingcodeandguesswhatitdoesbytryingseveral(atleast4)
inputs and seeing the output. Input m and n are assumed to be non
negative integers. Print the output for each input pair you try. Is this an
CSE 201, Spring 2012
Homework Set # 07
Solution
1. Web search and report the Unicode Code Point for each of the following
characters:
a. LATIN CAPITAL LETTER D
b. ARABIC LETTER QAF
c. BENGALI LETTER TA
d. PLAYING CARD QUEEN OF CLUBS
For each character, al
CSE201, Spring 2015
Homework Set# 14
Solution
1. How many color combinations are there if we use 12 bits to encode each
color component of RGB?
236 = 68,719,476,736 colors
2. The Python function randPicture(row, column) in the sample file,
generates a row
Tuesday, January 19, 2016
Notables
Lecture 03
Homework #1 is posted
Read: Top 10 Simple Things Every Computer User Should Know
Due Thursday January 21, 2015
How to Do
http:/lifehacker.com/5941496/top-10-simple-things-everycomputer-user-should-know-how-to
As you write your chapter summary, be sure that you address the
following questions for each chapter.
Chapter 1
Q: What search engine giant was formed by two Ph.D. students in 1996 at Stanford
University?
Q: A(n) _ is a recipe that specifies the exact seq
Tuesday, February 2, 2016
Notables
Lecture 07
Homework #3 is posted
Tuesday February 2, 2016
Due Thursday February 4, 2015
Install Python, if not done already
Forthcoming topics:
Python
148
149
String Methods.
String slicing
> s = 'this is a test'
> s.rep
Thursday, January 28, 2016
Notables
Lecture 06
Homework #3 will posted
Rubric for reading assignments is posted
Install Python, if not done already
Forthcoming topics:
Thursday January 28, 2016
Due Thursday February 4, 2015
Python
138
139
Variables and As
CSE201, Spring 2015
Homework Set# 15
Solution
1. An image file where each pixel is represented by a byte is given below. Give
a run-length PCX compression of this file.
00110001 00110001 00110001 00110001 00110001 10100011 10100011
10100011 10100011 11100
Tuesday, January 12, 2016
CSE 201 Catalog Description
CSE 201
Fundamentals of Information
Technology
Prerequisite:
Recommended Background:
Dr. Abdol-Hossein Esfahanian
Computer Science and Engineering Department
3115 Engineering Building
(CSE 101 or CSE 1
CSE 201
Fundamentals of
Information Technology
Spring 2015
_
Sample Questions
Fundamentals of Information Technology
CSE 201
Spring 2015
_
1. In the table below, for each technology, check the appropriate boxes.
Technology
Data is encrypted
Error correcti
Thursday, January 14, 2016
Notables
Lecture 02
Homework #1 is posted
Read: Top 10 Simple Things Every Computer User Should Know
Due Thursday January 21, 2015
How to Do
http:/lifehacker.com/5941496/top-10-simple-things-everycomputer-user-should-know-how-t
Tuesday, January 26, 2016
Notables
Lecture 05
Homework #2 is posted
Rubric for reading assignments is posted
Install Python, if not done already
Forthcoming topics:
Tuesday January 26, 2016
Due Thursday January 28, 2015
Algorithms
120
121
Solving Problems
def ms(K,L):
import random
N = []
N1 = []
for k in K:
N.append(k)
for l in L:
N.append(l)
while N:
minimum = N[0]
for n in N:
if n <= minimum:
minimum = n
N1.append(minimum)
N.remove(minimum)
return N1
"
CSE 201 HW5
Due 2-18-2016
NAME(s): Anjie He
"
#Put your code for problem 1 below
import random
def Powerball():
count = 0
num_list = []
while count <= 5:
n = random.randint(1, 69)
if n not in num_list:
num_list.append(n)
count = count + 1
else:
return
s
CSE 201, Spring 2016
Homework Set # 02
Due Thursday January 28, 2016
Show all your work, and type your solution
Make sure to print team members names
1. In about 100 words, summarize the main points of Chapter 2 of the Text.
The two main tasks for a searc
1. PageRank is the technology that launched Google. There are several tricks related to
this technology. First is hyperlink trick. Hyperlink trick is used by the computer to count
up the numbers of links to the current page to give it a rank. The link wit
Thursday, January 21, 2016
Notables
Lecture 04
Homework #2 will be posted
Forthcoming topics:
Due Thursday January 28, 2015
System review
Thursday January 21, 2016
78
79
Major Components of a Computer
Main Components
Hardware
Physical devices: Processor,
Thursday, February 4, 2016
Notables
Lecture 08
Homework #4 will be posted
Thursday February 4, 2016
Due Thursday February 11, 2015
Forthcoming topics:
Python
164
165
string lib
More Python Keywords
string constants
The string '0123456789'
string.ascii_low
Tuesday, February 9, 2016
Notables
Lecture 09
Homework #4 will be posted
Due Thursday February 11, 2015
Python help hour, tomorrow Wed night, 5 6pm,
in the Bone lab (3203 EB)
Forthcoming topics:
Tuesday February 9, 2016
Python
177
178
Python keyword def
P
CSE 201, Spring 2015
Homework Set # 12
Solution
1. In about 100 words, summarize the main points of Chapter 4 of the Text.
2. Web-search and report on following terms
a. Malware
Malware, a portmanteau of the words malicious and software, is a
catch-all te
def strHist(x):
'
prints a histogram of characters in x, in order
'
s = set(list(x)
# getting rid of duplicates
s = list(s)
s.sort()
for char in s:
n = x.count(char)
h = '*'*n
print(char, h)
def phn():
'
Generates a restricted random phone number
'
import
def ms(K,L):
if K = []:
return L
if L = []:
return K
F = []
while len(K) > 0 and len(L) > 0:
if K[0] < L[0]:
F.append(K[0])
K.pop(0)
else:
F.append(L[0])
L.pop(0)
if len(K) = 0 and len(L) = 0:
return F
if len(K) = 0 and len(L) > 0:
return F + L
else:
retu
CSE 201 Lecture 04
Thursday January 17, 2008
1
Notables
Homework #2 is due today Forthcoming topics
Object Representation Base conversion Introduction to Python
2
Object Representation; naming things
. Objects/Concepts . Representation
A one-to