1) Which of the following is a valid variable name in Python? a) 2name b) my_name c) class d) print 2) "What will this code print? a) HelloWorld b) Hello + World c) Hello World d) Error 3) Which method makes a string all uppercase? a) .upper() b) .capitalize() c) .lower() d) .replace() 4) True or False: A variable name in Python can include spaces. a) TRUE b) FALSE 5) True or False: The len() function can be used to count the number of characters in a string. a) TRUE b) FALSE 6) True or False: Functions in Python must always return a value. a) TRUE b) FALSE 7) "Fill in the blank to get the first character of the string word: a) 0 b) 2 c) 3 d) 1 8) Which of the following is NOT a valid Python data type? a) int b) str c) real d) list 9) "What will this code output? a) ALICE b) alice c) Alice d) Error 10) Which operator is used for exponentiation in Python? a) ^ b) ** c) exp() d) // 11) "What will this code print? a) 2 b) 2.5 c) 3 d) Error 12) True or False: Strings in Python are immutable. a) TRUE b) FALSE 13) Which function is used to find the length of a list or string? a) count() b) size() c) len() d) length() 14) Fill in the blank: The keyword used to return a value from a function is _____. a) return b) yield c) send d) output 15) Which method removes whitespace from both ends of a string? a) strip() b) trim() c) cut() d) split() 16) "What will this code print? a) y b) t c) P d) Error 17) Fill in the blank: To take input from the user, we use the _____ function. a) input() b) read() c) scan() d) ask() 18) "What will this code output? a) 10 b) 55 c) Error 19) Fill in the blank: The built-in function to convert a string to an integer is _____. a) int() b) str() c) float() d) convert() 20) True or False: In Python, you can assign multiple variables in one line. a) TRUE b) FALSE
0%
Variable, Strings, Methods, Functions
공유
공유
공유
만든이
Theudysmejiaper
10th Grade
Computing
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?