1) Which expression evaluates to 4? a) 7/2*3 b) 7%2+3 c) 7//2-3 d) 7-2*3 2) In which of the following cases we will get <class 'int'> as output? a) x=47.0 print(type(x)) b) x=2**2**2 print(type(x)) c) x=10+20j print(type(x)) d) x='47' print(type(x)) 3) The XYZ Company has hired you as an intern on the coding team that creates an e-commerce application. You must write a script that asks the user for a value. The value must be used as a whole number in a calculation, even if the user enters a decimal value. Which of the following meets this requirement? a) total_items=float(input('How many items you required?')) b) total_items=str(input('How many items you required?')) c) total_items=int(float(input('How many items you required?'))) d) total_items=input('How many items you required?') 4) Which of the following statements are valid? a) The following expression evaluates to 12 b=False+5-True+35//4 b) The following line will print result:4.5 print('result:',(7/2)+(False or True)+(9%3)) c) result=456+456.0 type of result is int d) s="Siri's voice recognition is Good" It causes an error because we cannot use double quotes and single quotes simultaneously 5) Which expression would evaluate to 2? a) 11/2 b) 3**2 c) 22%5 d) 13//4 6) From the sys module, by using which variable we can access command-line arguments? a) argsv b) argv c) arguments d) args 7) Consider the following code:print(type(eval(input('Enter some value:'))))if we enter 10 and 10.0 individually for every run what is the output? a) ? b) ?? c) ??? 8) Which type of exception will be raised if we are trying to call a method on the inappropriate object? a) IndexError b) TypeError c) AttributeError d) None of these 9) Which of the following are True? a) A try block can have any number of except blocks b) A try block can have any number of except blocks. c) A try block should be associated with atmost one finally block d) All the above 10) The base class for all exceptions in python is: a) ExceptionBase b) BaseException c) Exception d) EOFError
0%
Python (37)
공유
공유
공유
만든이
Lyaisan14
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?