Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Computer Science
Quiz 5: Algorithms
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Question 21
Short Answer
What sequence of values would be printed if the function xxx described below were executed with the value of N being 9? def xxx(N): if (N < 4): print(N) yyy(7) else: yyy(2) print(N) def yyy(N): if (N < 5): print(N) zzz(6) else: zzz(5) def zzz(N): if (N == 5): print(7) else: print(8) ________________________
Question 22
Short Answer
What would be printed if the following instructions were executed? X = 3 print(X) Y = 5 if (X < Y): print(6) else: print(7) _________________
Question 23
Short Answer
Which of the sequential or binary search algorithms would find the name Kelly in the list John,Kelly,Lewis,Maurice,Nathan,Oliver,Pat,Quincy,Roger,Stan,Tom more quickly? _______________
Question 24
Short Answer
Answer the following questions in terms of the function xxx below. def xxx(N): if (N < 7): print(N) else: N = n + 3 print(N) A.What value would be printed if the following function were executed with the value of N being 4? ____________ B.What value would be printed if the following function were executed with the value of N being 9? ____________
Question 25
Short Answer
What sequence of numbers would be printed if the following function were executed with the value of N being 0? def xxx(N): while (N < 4): print(N) N = N + 2 print(N) __________________
Question 26
Short Answer
What sequence of numbers would be printed if the function named xxx as described below were executed with the value of N being 2? def xxx (N): print(N) if (N < 3): yyy(4) print(N) def yyy(N): print(N) xxx(5) print(N) _____________________