
Fun with Python and ML
Authored by Aishwarya Sasanapuri
Other
12th Grade - Professional Development
Used 11+ 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 SELECT QUESTION
45 sec • 1 pt
How will you extract Python from the string word "I love Python programming"? (More than one answers may be correct.)
word[7:13]
word[6:13]
word[7:12]
word[-18:-12]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between '/' and '//'?
'/' returns a float, '//' returns the integer part and discards the fractional part.
'//' returns a float, '/' returns the integer part and discards the fractional part.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The '%' operator returns the ________?
Float operations
Remainder of the division
none
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose list_1 is [2, 33, 222, 14, 25]. What is list_1[-3]?
33
25
222
14
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an advantage of using local variables?
They allow the variable to be used throughout the whole program
They allow variable identifiers to be reused each time
They are easier to program than global variables
A wider range of data types can be used
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
def dice roll ():
def diceroll ()
def diceroll ():
def diceroll []:
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 Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?