
Recap Sli 17
Authored by Kadry Hanafy Mahmoud Kadry
Information Technology (IT)
12th Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
1.What will be printed in that code?
a) 5
b) 9
c) 0
d) 10
2.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
2.How could we iterate on the letters of the string “hello”?
a) ‘for i in range("hello")’
b) ‘for i in range(5)’
c) ‘for i in "hello" ’
d) ‘while i < "hello" ’
3.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
3.What is written between brackets in the function’s definition and do they act as placeholders for values passed when the function is called?
a) Arguments
b) Parameters
c) Return Values
d) None of the Above
4.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
What does this function do?
a) It returns the index of the first occurrence of ‘x’ in ‘y’.
b) It returns the index of the last occurrence of ‘x’ in ‘y’.
c) It returns the number of the occurrences of ‘x’ in ‘y’.
d) It returns the length of the string ‘y’.
5.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
What does this function calculate?
a) x ** 2
b) x*(x-1)/2
c) x + 1
d) factorial of ‘x’
6.
MULTIPLE CHOICE QUESTION
5 sec • 1 pt
the output of this code?
•Answer:
16,12
True
False
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6.What is the keyword ‘break’ used for?
Answer: to exit the loop immediately.
True
False
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?