
python q3
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Standards-aligned
Melissa Guillermo
Used 34+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you slice a Python array `arr` to get the first three elements?
`arr[0:2]`
`arr[0:4]`
`arr[:3]`
`arr[1:3]`
Tags
DOK Level 1: Recall
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How do you add multiple items (e.g., [4, 5, 6]) to the end of a Python array `arr`?
`arr.append([4, 5, 6])`
`arr.extend([4, 5, 6])`
`arr.add([4, 5, 6])`
`arr.insert([4, 5, 6])`
Tags
DOK Level 1: Recall
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of an array in Python?
To perform mathematical operations
To define functions
To store multiple values in one variable
To create loops
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What method is used to add an element at the end of an array in Python?
append()
extend()
copy()
clear()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output-
f=open('abc.txt','a')
text="xyz"
f.write(text)
f.close()
Writing into the file without erasing old content
Writing into the file by erasing old content
reading from the file without erasing old content
reading from the file by erasing old content
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mode in the following program to open file for writing in a mode where new data will be added at the end of old data
file =open("poem.txt","__")
r
w
a
r+
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which function read single line at a time?
read()
read(n)
readline()
readlines()
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?
Similar Resources on Wayground
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Planning and Implementation of Information Security
Quiz
•
University
20 questions
Network topologies
Quiz
•
8th Grade - University
20 questions
Software Engineering Quiz 1
Quiz
•
University
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
10 questions
Machine Learning (Introduction)
Quiz
•
University
20 questions
Round 1 ( RHA Learner Contest )
Quiz
•
University
11 questions
Determining System Requirements
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
