1) What is a correct way to declare a Python variable? a) var x = 5 b) #x = 5 c) $x = 5 d) x = 5 2) You can declare string variables with single or double quotes. a) True b) False 3) Variable names are not case-sensitive. a) True b) False 4) Which is NOT a legal variable name? a) my-var = 20 b) my_var = 20 c) Myvar = 20 d) _myvar = 20 5) How can we create a variable named carname and assign the value Volvo to it? a) carname = #Volvo b) carname = "Volvo" 6) How can we create a variable named x and assign the value 50 to it. a) _x = 50 b) x = 50 c) 'x' = 50 7) What is a correct syntax to add the value 'Hello World', to 3 values in one statement? a) x, y, z = 'Hello World' b) x = y = z = 'Hello World' c) x|y|z| = "Hello World" 8) Chose the correct syntax for assign values to multiple variables in one line: a) x, y, z = "Orange", "Apple", "Cherry" b) x + y + z = "Orange", "Apple", "Cherry" 9) What will be the result of a? a) apple b) banana c) cherry 10) Considering the following code, what will be the printed result? a) Hello, World b) Hello World c) HelloWorld 11) Considering the following code, what will be the printed result? a) a + b b) Hello World c) Helloworld 12) Considering the following code, what will be the printed result? a) 45 b) 9 c) 4+5 13) Considering the following code, what will be the printed result? a) Python is awesome b) Pyton is fantastic 14) What keyword we must to insert to make the variable x belong to the global scope. a) int b) global c) string 15) Considering the following code, what will be the printed result? a) Python is awesome b) Python is fantastic
0%
Python quiq test - Variables
공유
공유
공유
만든이
Bejancristinaelena
Gimnaziu
Info
Programare în Python
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?