
Quiz on Constructors and Destructors in Python
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
007_Yazid Rizki
Used 2+ times
FREE Resource
Enhance your content in a minute
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
20 questions
Bab 1 Informatika dan Keterampilan Generik Kelas 7
Quiz
•
11th Grade
15 questions
PTS Informatika Genap
Quiz
•
9th - 12th Grade
20 questions
TIK KD 3
Quiz
•
1st - 12th Grade
20 questions
Informatika dasar
Quiz
•
11th Grade
15 questions
PH INFORMATIKA KELAS 7
Quiz
•
11th - 12th Grade
22 questions
ASK Tingkatan 2 -(3.2 Struktur Kod Arahan - Ralat)
Quiz
•
1st - 12th Grade
20 questions
PENILAIAN SUMATIF DATA AWAL MYOB
Quiz
•
11th Grade
15 questions
Pemrograman
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
