



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




































1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
1 Policies & Material
2 General Questions
3 Python code and Flowcharts
4 Circuits and Logic Gates
5 Functions
6 Summary
MCS 260 Lecture 16 Introduction to Computer Science Jan Verschelde, 1 October 2008
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
first midterm on Friday 3 October
Like quizzes, the exams are open book and open notes. In contrast to quizzes, calculators or laptop computers are not allowed. The policy on skipping exams is: If an exam is missed, then greater weight will be placed on the final exam, especially on the material covered on the missing exam. What this means is that if you decide not to take one midterm exam, your final exam will be weighted for one hundred points more. What it does NOT mean is that you can drop the score of a midterm exam. If you take the midterm, then your score counts. So, please be prepared when you show up for the exam.
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
1 List the characteristics of an algorithm. Answer: precise and detailed enough to be implemented by a computer. 2 How many bytes are 15 terabytes? Answer: 1012 bytes. 3 Explain the difference between 34/87 and 34.0/87. Answer: 34/87 gives the integer division, whereas 34.0/87 returns a float. 4 What is an interrupt? Answer: an interrupt causes an executing process to go in waiting or ready state.
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
1 List the characteristics of an algorithm. Answer: precise and detailed enough to be implemented by a computer. 2 How many bytes are 15 terabytes? Answer: 1012 bytes. 3 Explain the difference between 34/87 and 34.0/87. Answer: 34/87 gives the integer division, whereas 34.0/87 returns a float. 4 What is an interrupt? Answer: an interrupt causes an executing process to go in waiting or ready state.
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
1 List the characteristics of an algorithm. Answer: precise and detailed enough to be implemented by a computer. 2 How many bytes are 15 terabytes? Answer: 1012 bytes. 3 Explain the difference between 34/87 and 34.0/87. Answer: 34/87 gives the integer division, whereas 34.0/87 returns a float. 4 What is an interrupt? Answer: an interrupt causes an executing process to go in waiting or ready state.
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
1 List the characteristics of an algorithm. Answer: precise and detailed enough to be implemented by a computer. 2 How many bytes are 15 terabytes? Answer: 1012 bytes. 3 Explain the difference between 34/87 and 34.0/87. Answer: 34/87 gives the integer division, whereas 34.0/87 returns a float. 4 What is an interrupt? Answer: an interrupt causes an executing process to go in waiting or ready state.
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
answer to question 5
x = input(’give a number : ’) m = x q = m/25 # number of quarters m = m%25 # rest of money d = m/10 # number of dimes m = m%10 # rest of money n = m/5 # number of nickels p = m%5 # number of pennies print ’$0.%d is
#quarters = %d, #dimes = %d,
#nickels = %d, #pennies = %d’ % (x,q,d,n,p)
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
answer to question 5
x = input(’give a number : ’) m = x q = m/25 # number of quarters m = m%25 # rest of money d = m/10 # number of dimes m = m%10 # rest of money n = m/5 # number of nickels p = m%5 # number of pennies print ’$0.%d is
#quarters = %d, #dimes = %d,
#nickels = %d, #pennies = %d’ % (x,q,d,n,p)
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Consider the circuit shown below. For b 1 1 and b 2 0 as input, indicate on the picture below the input and output for every logical gate.
b 2
b 1
Answer:
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Consider the circuit shown below. For b 1 1 and b 2 0 as input, indicate on the picture below the input and output for every logical gate.
b 2
b 1
Answer:
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Draw the flowchart for the algorithm to search for the maximum in a list of unsorted numbers.
(^)
(^) L i (^) m ?
False
i i 1
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Draw the flowchart for the algorithm to search for the maximum in a list of unsorted numbers.
(^)
(^) L i (^) m ?
False
i i 1
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Draw the flowchart for the algorithm to search for the maximum in a list of unsorted numbers.
(^)
(^) L i (^) m ?
False
i i 1
1 Oct 2008
Policies & Material General Questions Python code and Flowcharts Circuits and Logic Gates Functions Summary
Draw the flowchart for the algorithm to search for the maximum in a list of unsorted numbers.
(^)
(^) L i (^) m ?
False
i i 1