Python Runtime Errors and Exception Handling Quiz

Python Runtime Errors and Exception Handling Quiz

University

10 Qs

quiz-placeholder

Similar activities

Quiz Komponen Komputer

Quiz Komponen Komputer

1st Grade - University

10 Qs

ICT Assesment

ICT Assesment

10th Grade - University

15 Qs

Django - WEB50

Django - WEB50

University

12 Qs

Latihan Pemahaman

Latihan Pemahaman

University

10 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

DCN5511: Chapter 5 - 7

DCN5511: Chapter 5 - 7

University

15 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

PythonProgramming

PythonProgramming

University

15 Qs

Python Runtime Errors and Exception Handling Quiz

Python Runtime Errors and Exception Handling Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Tri Muliawati

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa yang akan dilakukan Python apabila terdapat error atau exception?

Python akan memperbaiki bagian kode yang menghasilkan error secara otomatis

Python akan mengabaikan Error dan tetap menjalankan program

Python akan memunculkan Error dan menghentikan program

Python akan memunculkan Error dan tetap menjalankan program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Untuk mengantisipasi kemungkinan munculnya error, maka bagian kode yang berpotensi menghasilkan error perlu diletakkan di dalam block apa?

catch

handle

raise

try

3.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

Manakah diantara pernyataan berikut yang benar terkait exception handling.

Block except diletakkan setelah block try

1 block try dapat memiliki lebih dari 1 block except

Block except tanpa nama (unnamed except) boleh diletakkan sebelum block except yang memiliki nama (named except)

Setiap block except perlu diberi nama secara explisit

4.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

Manakah diantara nama berikut yang merupakan built-in exception pada Python?

FileNotFoundError

ValueError

TypeError

KeyError

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa kegunaan dari keyword "assert" pada Python?

Untuk menangani error

Untuk mendefinisikan fungsi

Untuk mengevaluasi sebuah ekspresi dan menampilkan exception / error apabila ekspresi tidak terpenuhi (bernilai False)

Untuk mengevaluasi sebuah ekspresi dan menampilkan exception / error apabila ekspresi terpenuhi (bernilai True)

6.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

Apa luaran dari scipt berikut?

'Ada kesalahan penerapan aritmatika di sini'

'Bilangan tidak boleh dibagi dengan 0'

'0'

Program tidak bisa dijalankan dan memunculkan error

7.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

Apa luaran dari scipt berikut?

'Nilai total adalah 1.3'

'Nilai total adalah 1.3

Key berhasil ditemukan'

'Key tidak ditemukan'

'Key berhasil ditemukan'

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?

Discover more resources for Computers