Python Basics Day 12

Python Basics Day 12

University

5 Qs

quiz-placeholder

Similar activities

API introduction

API introduction

University

9 Qs

Python Dictionary

Python Dictionary

University

10 Qs

Quiz MS. Word 2023

Quiz MS. Word 2023

University

10 Qs

php file handling

php file handling

University

10 Qs

Simdig

Simdig

12th Grade - University

10 Qs

ESIOT Quiz

ESIOT Quiz

University

9 Qs

ASP. NET QUIZ_1

ASP. NET QUIZ_1

University

10 Qs

กลุ่มที่ 2: Node-Red และการสร้าง Flow

กลุ่มที่ 2: Node-Red และการสร้าง Flow

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)