1) What is a correct syntax to output 'Hello World' in Python? a) print('Hello World') b) echo 'Hello World' c) printf('Hello World') d) cout << 'Hello World' e) System.out.println('Hello World') f) Console.WriteLine('Hello World') 2) How do you insert COMMENTS in Python code? a) // This is a comment b) # This is a comment c) <!-- This is a comment --> d) /* This is a comment */ e) REM This is a comment f) COMMENT This is a comment 3) Which of the following is a mutable data type in Python? a) Tuple b) List c) String d) Integer e) Float f) Boolean 4) How do you start a function in Python? a) function myFunction() b) def myFunction() c) create myFunction() d) start myFunction() e) begin myFunction() f) init myFunction() 5) Which keyword is used for function in Python? a) func b) define c) def d) function e) declare f) create 6) How do you create a variable with the numeric value 5? a) x = 5 b) int x = 5 c) x := 5 d) x <- 5 e) x == 5 f) x = 5.0 7) Which operator is used to multiply numbers in Python? a) * b) x c) ^ d) % e) & f) @ 8) Which of the following is a valid variable name in Python? a) 1variable b) variable_1 c) variable-1 d) variable 1 e) variable.one f) variable#1 9) What is the output of print(2 ** 3)? a) 6 b) 8 c) 9 d) 5 e) 4 f) 10 10) Which method can be used to remove any whitespace from both ends of a string? a) strip() b) trim() c) cut() d) remove() e) delete() f) erase() 11) Which of the following is used to define a block of code in Python? a) {} b) () c) [] d) Indentation e) <> f) // 12) What is the correct file extension for Python files? a) .py b) .python c) .pt d) .pyt e) .pyth f) .p 13) How do you create a dictionary in Python? a) {key: value} b) [key: value] c) (key: value) d) <key: value> e) key: value f) key = value 14) Which of the following is not a Python data type? a) Set b) Array c) List d) Tuple e) Dictionary f) String 15) Which function is used to get the length of a list in Python? a) length() b) len() c) size() d) count() e) measure() f) getLength() 16) What is the output of print(10 // 3)? a) 3.33 b) 3 c) 3.0 d) 4 e) 2 f) 2.5 17) Which keyword is used to create a class in Python? a) class b) Class c) define d) create e) object f) new 18) How do you create a set in Python? a) set() b) {} c) [] d) () e) <> f) set{} 19) What is the correct syntax to import a module named 'math'? a) import math b) include math c) require math d) use math e) load math f) attach math 20) Which of the following is used to handle exceptions in Python? a) try/except b) catch/throw c) handle/error d) try/catch e) begin/rescue f) error/handle
0%
Python Coding Quiz
공유
공유
공유
만든이
Tylerl27
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
게임쇼 퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
AI 강화: 이 활동에는 AI가 생성한 콘텐츠가 포함되어 있습니다.
더 알아보세요.
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?