This preview shows page 1. Sign up to view the full content.
Unformatted text preview: al to start.
(In the meantime, please ﬁll out the identiﬁcation section above,
and read the instructions below carefully.) ad ID
: 16 80 Last (Family) Name(s): 85 : 16 : 29 ID 80 er ad lo wn Do Downl
oader ID: 2985 UofT Student Buddy @ http://utoronto.studentbuddy.com
This test is copyrighted by the uploader and/or course instructor.
Downloader id is shown and also encrypted throughout the document.
Unauthorized reproduction/distribution is strictlyPage 1
Solution (if any) is NOT audited, so use at your discretion. cont’d. . . 2985
ader ID: Downlo r ID:
298 : 80
st Te CSC 108H1Y JUNE 2009 Te Midterm Exam st
ID 80 : 16 16 : 8 ID
Te 85 : 29 ID Question 1. er
ad lo wn
Do [5 marks]
Dow nlo ade r ID: Complete the following function according to its docstring description.
298 5 def rep_chars (s, num):
’’’Return a string consisting of each character of s repeated num times.
For example, rep_chars (’abc’, 2) returns aabbcc’’’
80 : 16 ID st Te nlo ade r ID: 298 5 ID: 1680 Dow Test Do
29 80 85 85
ID om er 16 ad
wn Do wn lo...
View Full Document
This note was uploaded on 11/27/2010 for the course CS 108 taught by Professor Paulgries during the Spring '08 term at University of Toronto- Toronto.
- Spring '08