Python Basics Day 12

Python Basics Day 12

University

5 Qs

quiz-placeholder

Similar activities

MOAC Word 2016 Lesson 1

MOAC Word 2016 Lesson 1

8th Grade - University

10 Qs

Creating and Managing Workbooks

Creating and Managing Workbooks

University

10 Qs

Lesson 8: Read and Write External Files

Lesson 8: Read and Write External Files

University

5 Qs

Year 2, Unit 5.1, 5.2, 5.3

Year 2, Unit 5.1, 5.2, 5.3

1st Grade - University

10 Qs

Application Software

Application Software

11th Grade - University

10 Qs

Photoshop

Photoshop

University

10 Qs

DS3002 Sample Quiz

DS3002 Sample Quiz

University

6 Qs

Microsoft Creating Spreadsheets

Microsoft Creating Spreadsheets

University

10 Qs

Python Basics Day 12

Python Basics Day 12

Assessment

Quiz

Computers

University

Hard

Created by

Ninitha C

FREE Resource

5 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Package to be imported for handling json files

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Select the statement to open the json file for writing only
with open('student.json','wr') as file:
with open('student.json','w') as file:
open('student.json','w') as file:
with open('student.json','write') as file:

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mode to open file for writing where new data will be added at the end of old data. Previous data is not erased,
r
w
a
r+

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A json file is opened in writing mode in a variable "file". How do u push a Python Dict object "dict" to the file with proper formatting
json.dump(dict,file,indent=2)
json.dump(dict,file)
json.dumps(dict,file,indent=2)
json.push(dict,file,indent=2)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement parses the file(file opened in a variable "file") when read and converts the contents into a Python Dictionary object(variable name "dict").
dict = json.parse(file)
dict = json.load(file)
dict = json.dict(file)
dict = json.toParse(file)