A 2 b 1 c 0 d none of these

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: print(‘yes’) else: print(‘no’) is executed, how many times will ‘yes’ be printed? a) 2 b) 1 c) 0 d) none of these When the statement for ch in str1: if ch in str2: print(‘yes’) is executed, how many times will ‘yes’ be printed? a) 2 b) 1 c) 0 d) none of these (2) Given: from turtle import * for i in range(4): fd(100); rt(90) What will the turtle draw as the result of executing the above code? a) circle b) square c) the letter ‘A’ d) none of these (3) Given: rabbits = 3 while rabbits > 0: print(rabbits) rabbits = rabbits – 1 What will be printed as a result of executing the above code? a) b) c) d) none of these 3 3 3 2 2 1 1 0...
View Full Document

This note was uploaded on 02/12/2014 for the course CIS 122 taught by Professor Staff during the Spring '08 term at University of Oregon.

Ask a homework question - tutors are online