1) In Python, what is the purpose of the input() function when used with a variable? a) To display output b) To perform mathematical calculations c) To read user input d) To define a new variable 2) Which of the following is a correct way to concatenate two strings stored in variables name1 and name2? a) name1 + name2 b) join(name1, name2) c) concat(name1, name2) d) merge(name1, name2) 3) What is the data type of the variable in the following statement: price = 29.99? a) Integer b) Float c) String d) Boolean 4) Which of the following is a correct way to assign a value to a variable in Python? a) x = 5 b) x := 5 c) value 5 to x d) x >> 5 5) What is the purpose of the if statement in Python? a) To declare a variable b) To perform conditional execution of code c) To create a loop d) To print output 6) In an if-else statement, what happens if the condition in the if block is not met? a) The else block is executed b) An error occurs c) The program terminates d) The if block is re-evaluated 7) How can multiple conditions be combined in an if statement? a) Using the or keyword b) Using both or and and c) Using the and keyword d) Only one condition is allowed 8) What is the purpose of the elif statement in Python? a) To declare a new variable b) To print output c) To handle multiple conditions d) To end the program 9) What is the role of indentation in Python's if-else statements? a) It is optional and does not affect the code b) It is required to define the scope of the code blocks c) It is used for decoration d) It causes errors
0%
Variable and If Statements
공유
공유
공유
만든이
Asheik
Secondary
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?