Quiz_2_Skill_Lab_Python_Programming

Quiz_2_Skill_Lab_Python_Programming

University

30 Qs

quiz-placeholder

Similar activities

Fiscal Policy Quiz

Fiscal Policy Quiz

University

25 Qs

BAB 5: PENGENALAN KEPADA PERISIAN APLIKASI PERSEMBAHAN

BAB 5: PENGENALAN KEPADA PERISIAN APLIKASI PERSEMBAHAN

University

25 Qs

QUIZ 8PM 07-07

QUIZ 8PM 07-07

7th Grade - Professional Development

25 Qs

Latihan Bahasa Indonesia

Latihan Bahasa Indonesia

University

25 Qs

PIn5

PIn5

University

25 Qs

Famous Buildings JEE Paper - 2

Famous Buildings JEE Paper - 2

7th Grade - Professional Development

25 Qs

BRITAIN: COUNTRY AND PEOPLE

BRITAIN: COUNTRY AND PEOPLE

University

25 Qs

Professional Selling - Unit 2 Exam

Professional Selling - Unit 2 Exam

University

25 Qs

Quiz_2_Skill_Lab_Python_Programming

Quiz_2_Skill_Lab_Python_Programming

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Gauri Chavan

Used 13+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?