Study Guides (380,000)
CA (150,000)
UTSC (10,000)
All (20)
Midterm

CSCA08 Midterm Test Fall 2017Exam


Department
Computer Science
Course Code
CSCA08H3
Professor
All
Study Guide
Midterm

This preview shows pages 1-3. to view the full 12 pages of the document.
CSC A08 2013 Midterm Test
Duration — 50 minutes
Aids allowed: none
Student Number:
Instructor: Brian Harrington
Last Name: First Name:
Please place a checkmark (X) beside your tutorial session
Tutorial Number Date/Time TA Name Check
TUT0001 WE11:00 - 13:00 Denning Campbell
TUT0002 WE11:00 - 13:00 Shichu Lin
TUT0003 FR09:00 - 11:00 Ekin Ozcelik
TUT0004 WE15:00 - 17:00 Nick (Ruo Fan) Li
TUT0005 WE15:00 - 17:00 Nicholas Olson-Harris
TUT0006 FR13:00 - 15:00 Philip (Jianhao) Yang
TUT0007 TH11:00 - 13:00 Umair Idris
TUT0008 TH11:00 - 13:00 Kenneth Ma
TUT0009 TH13:00 - 15:00 Eric Ren
TUT0010 TH13:00 - 15:00 Edouard Magharian
TUT0011 TH15:00 - 17:00 Cyan Kuo
TUT0012 TH15:00 - 17:00 Harmen (Hardarshan) Kahlon
TUT0013 FR09:00 - 11:00 Faisal Usmani
TUT0014 MO10:00 - 12:00 Gabrielle Singh-Cadieux
TUT0015 MO10:00 - 12:00 Yamn Chalich
TUT0016 MO10:00 - 12:00 Judy Duong
TUT0017 TU13:00 - 15:00 Michelle (Xiaopeng) Cui
Do not turn this page until you have received the signal to start.
Please fill out the identification section
and read all instructions before starting.
Good Luck!
This midterm consists of 4 questions on 12 pages (including this one). When
you receive the signal to start, please make sure that your copy is complete.
Proper documentation is required for all functions and code blocks. No error
checking is required: assume all user input and all argument values are valid.
If you use any space for rough work, indicate clearly what you want marked.
Please read all questions thoroughly before starting on any work.
# 1: / 5
# 2: / 5
# 3: /10
# 4: /20
TOTAL: /40
Total Pages = 12 Page 1 cont’d. . .

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

CSC A08 Midterm Test Fall 20l3
[Use the space below for rough work. This page will not be marked unless you clearly indicate the part of
your work that you want us to mark.]
Student #: Page 2 of 12 cont’d. . .

Only pages 1-3 are available for preview. Some parts have been intentionally blurred.

CSC A08 Midterm Test Fall 20l3
Question 1. [5 marks]
Write the output of the following code in the space provided
my_string = "Welcome to CSCA08!"
result = ""
for next_letter in my_string:
if (next_letter.isalpha()):
result += "X"
elif (next_letter.isdigit()):
result += "#"
else:
result += "!"
if (next_letter in "AEIOU"):
print("VOWEL")
if (next_letter in "BRIAN"):
print("Hi Brian")
print(result)
Student #: Page 3 of 12 cont’d. . .
You're Reading a Preview

Unlock to view full version