Logo
search
menuicon
thubnail
Halaman Sekolah
Bebas

python programming

Aghata Dhiwi A
132
Pertanyaan yang ditambahkan (10/ 20)
Izinkan jawaban yang salah
Sembunyikan jawaban
public kuis

Pertanyaan 1

Pilihan ganda

What is the correct way to define a variable in Python?

  • var x = 5
  • x := 5
  • x = 5
  • int x = 5

Pertanyaan 2

Pilihan ganda

Which function is used to get input from a user in Python?

  • input()
  • scanf()
  • get()
  • read()

Pertanyaan 3

Pilihan ganda

What is the output of the following code: print('Hello, World!')?

  • Hello, World
  • Hello, World!
  • Syntax Error
  • Hello World!

Pertanyaan 4

Pilihan ganda

Which of the following is a conditional statement in Python?

  • for
  • while
  • if
  • define

Pertanyaan 5

Pilihan ganda

Which loop is used for iterating over a sequence (such as a list or string)?

  • for
  • while
  • do-while
  • foreach

Pertanyaan 6

Pilihan ganda

What is the purpose of a function in Python?

  • To store data
  • To perform a specific task
  • To write comments
  • To output data

Pertanyaan 7

Pilihan ganda

What is the syntax to import a module in Python?

  • #include <module>
  • import module
  • using module
  • module import

Pertanyaan 8

Pilihan ganda

Which of the following is not a Python standard library?

  • math
  • os
  • numpy
  • sys

Pertanyaan 9

Pilihan ganda

What is a package in Python?

  • A collection of modules
  • A single function
  • A variable
  • A library

Pertanyaan 10

Pilihan ganda

What is the correct syntax to define a function with two parameters in Python?

  • def function(param1 param2):
  • def function(param1, param2):
  • function(param1, param2):
  • def function[]:(param1, param2)
Bagikan ke Google Classroom