
Quiz on Constructors and Destructors in Python
Authored by 007_Yazid Rizki
Computers
11th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa tujuan dari konstruktor dalam Python?
Untuk menginisialisasi objek saat dibuat
Untuk memvalidasi data input
Untuk menghapus objek dari memori
Untuk membuat kelas baru
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Metode mana yang digunakan sebagai konstruktor di Python?
__del__
__init__
__new__
__call__
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa yang terjadi jika konstruktor menerima nilai usia negatif?
Eksepsi ValueError terjadi
Objek dibuat dengan usia default
Usia diatur menjadi nol
Program mengalami crash
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa peran dari destruktor dalam Python?
Untuk membuat instance baru dari sebuah kelas
Untuk memvalidasi input pengguna
Untuk membersihkan sumber daya sebelum objek dihapus
Untuk menginisialisasi atribut objek
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa nama metode destruktor di Python?
__init__
__del__
__close__
__exit__
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa yang diinisialisasi oleh konstruktor kelas AkunBank?
Pemilik dan saldo awal
Riwayat transaksi dan biaya
Nomor akun dan kata sandi
Suku bunga dan jumlah pinjaman
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Apa masalah potensial dengan destruktor di Python?
Mereka hanya dapat membersihkan file
Mereka mungkin tidak dipanggil jika ada referensi melingkar
Mereka tidak dapat didefinisikan dalam sebuah kelas
Mereka selalu dipanggil segera
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Dasar Pemrograman (PostTest)
Quiz
•
9th - 12th Grade
15 questions
PRE TEST ASJ-FILE SERVER-SEMESTER II
Quiz
•
11th Grade
20 questions
UH - 01 VII
Quiz
•
1st - 12th Grade
15 questions
Asesmen Diagnostik Non Kognitif (Gaya Belajar)
Quiz
•
11th - 12th Grade
16 questions
Kod Arahan
Quiz
•
9th - 11th Grade
20 questions
LATIHAN SIMDIG
Quiz
•
9th - 12th Grade
20 questions
Fungsi IF, AND dan OR
Quiz
•
10th - 12th Grade
20 questions
SUMATIF IV
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
10 questions
Evaluating Piecewise Functions Practice
Quiz
•
11th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade