Alprog Pert 13

Alprog Pert 13

University

10 Qs

quiz-placeholder

Similar activities

Class and Object

Class and Object

University

10 Qs

Bài 28

Bài 28

10th Grade - University

15 Qs

SBD QUIZ#13

SBD QUIZ#13

University

10 Qs

Coding With Python- Introductory Quiz

Coding With Python- Introductory Quiz

University

13 Qs

Learning Concept in AI Quiz

Learning Concept in AI Quiz

University

7 Qs

Jaringan Komputer dan Topologi

Jaringan Komputer dan Topologi

11th Grade - University

8 Qs

Introduction To Programming - Lesson Exception Handling

Introduction To Programming - Lesson Exception Handling

11th Grade - University

13 Qs

Python Review - Class Mobil

Python Review - Class Mobil

7th Grade - University

10 Qs

Alprog Pert 13

Alprog Pert 13

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Anjeng Ningrum

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Dalam custom exception class berikut, baris mana yang menyimpan data ‘cheese’?

def init

self, pizza, cheese, message

pizzaerror.init

self.cheese = cheese

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Jika kamu ingin membuat exception khusus seperti TooMuchCheeseError, kamu harus...

Turunkan dari BaseException dan tambahkan pass

Turunkan dari TypeError

Gunakan raise tanpa class

Turunkan dari Exception dan bisa tambahkan konstruktor

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Apa hasil dari kode berikut ?

ValueError

Kesalahan!

('Kesalahan!',)

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Di Python, exception adalah...

Objek dari class turunan BaseException

Blok program yang harus selalu ada

Variabel khusus Python

Fungsi pengendali loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa output dari fungsi tanpa parameter yang dipanggil dengan argumen?

Tidak ada output

Error

Argumen diabaikan

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Fungsi def data(nama, usia) dipanggil dengan data(usia=20, nama=\"Ani\"). Hasilnya?

Valid

Error

'Ani'

Tidak Terbaca

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Hasil dari def f(x, y=3): return x + y, lalu f(4)?

Error

10

4

7

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Information Technology (IT)