Quiz
CS1101 Week 6
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (15)
1A function that returns an integer value greater than 0 is called a Boolean function.
- AVerdadeiro
- BFalso
2Encapsulation is the process of wrapping a piece of code in a function
- AVerdadeiro
- BFalso
3Repeated execution of a set of programming statements is called repetitive execution.
- AVerdadeiro
- BFalso
4A development approach that is intended to avoid a lot of debugging by only adding and testing small amounts of code at a time is called.
- Astructured development
- Bincremental development
- Cunit testing
- Dsystems development life cycle
5What output will the following code produce?
def area(l,w);
temp=l*w;
return temp
l=4.0
w=3.25
x=area(l,w)
if(x):
print(x)- A13.0
- B0
- Cexpression does not evaluate to Boolean true
- D13
6What output will the following code produce?
n=10
while n!=1:
print(n,)
if n%2==0: #n is even
n=n//2
else: #n is odd
n=n*3+1- A10 5 16 8 4 2
- Bnone an error will be displayed
- C8 4 2
- D9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2
7What output will the following statements produce?
n=2
n+=5
print(n)- A7
- B5
- C0
- Dnone
8The statements inside of a loop are known as the _____ of the loop.
- Abody
- Bexpression
- Ccounter
- Dblock
9A loop where terminating condition is never achieved is called an _____.
- Ainfinite loop
- Buniversal loop
- Cwhile loop
- Dfor .. ever loop
10Functions can only return Boolean expressions.
- AVerdadeiro
- BFalso
11With built in functions, it is generally acceptable to take a "Leap of Faith".
- AVerdadeiro
- BFalso
12"Dead Code" is code that performs calculations but never displays the results
- AVerdadeiro
- BFalso
13Boolean expressions control _____.
- Arecursion
- Bconditional execution
- Calternative executive
- Dall of the above
14The modulus operator is the same as the divide operator.
- AVerdadeiro
- BFalso
15Chained conditionals are used when there are three or more possibilities.
- AVerdadeiro
- BFalso
Informações
- Descrição
- AS - Level Computer Science (CS 1101 Python) Quiz sobre CS1101 Week 6, criado por Troy Bowlin em 18-05-2016.
- Autor
- Troy Bowlin
- Idioma
- English
- Visualizações
- 367
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz