
Quiz_2_Skill_Lab_Python_Programming

Quiz
•
Other
•
University
•
Medium
Gauri Chavan
Used 13+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements are true?
When you open a file for reading, if the file does not exist, an error occurs
When you open a file for writing, if the file does not exist, a new file is created
When you open a file for writing, if the file does not exist, a new file is created
ALL
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To open a file c:\scores.txt for reading, we use
infile = open(“c:\\scores.txt”, “r”)
infile = open(“c:\\scores.txt”)
Both
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To read two characters from a file object infile, we use ____________
infile.read()
infile.readline()
infile.read(2)
infile.readlines()
4.
MULTIPLE CHOICE QUESTION
30 sec • 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
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where files are store permanently?
RAM
Hard Disk
Cache memory
None of these
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a class (in python)?
A user-defined prototype for an object that defines a set of attributes that characterize any object of this. The attributes are data members and methods, accessed via dot notation.
A special kind of function that is defined in a class definition.
The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.
the system of ordering a society in which people are divided into sets based on perceived social or economic status.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an object in python?
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
A special kind of function that is defined in a class definition.
The assignment of more than one function to a particular operator.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Kuis VBA Excel

Quiz
•
University
30 questions
Computer Fundamentals

Quiz
•
University
30 questions
JavaScript

Quiz
•
University
30 questions
AND-801 Quiz test

Quiz
•
KG - Professional Dev...
32 questions
Unit 4

Quiz
•
University
25 questions
Quis Desain Media Pembelajaran 2025

Quiz
•
University
35 questions
WS tools

Quiz
•
University
25 questions
HOSPEDAJE I

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University