TORONTO KIDS COMPUTER CLUB | Monday Online Python Homework 03.04.
16171
post-template-default,single,single-post,postid-16171,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Monday Online Python Homework 03.04.

05 Mar Monday Online Python Homework 03.04.

Question 1:

Using function or object method to write a program to return the number of times that the string
“code” appears anywhere in the given string, except we’ll accept any letter for the ‘d’, so “cope” and “cooe” count.

For example:

‘aaacodebbb’ will have 1 “code”
‘codexxcode’ will have 2 “code”
‘cozexxcope’ will be counted as 2, since ‘coze’ and ‘cope’ count


Question2:

Draw the following picture in the pygame window: (could be different color)

 

No Comments

Sorry, the comment form is closed at this time.