O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

CS 1101 Week 5

Troy Bowlin 13 perguntas

Fazer o quiz

Perguntas do quiz (13)

  1. 1What does the function subroutine do?

    def subroutine(n):
    while n>0:
    print(n,)
    n-=1
    1. ACounts down from 10 to 0 and displays each number
    2. BCounts from n down to 1 and displays each number
    3. CCalculates the sum of n numbers greater than 0
    4. DCalculates the mean of n
  2. 2What output will the following python command produce:

    >>>percentage = float (60*100)/50
    >>>print(percentage)
    1. Apercentage
    2. B109
    3. C109.0909090909091
    4. D109.0
  3. 3What outputs will the following python commands produce:
    n=10000
    count=0
    while n:
    count=count+1
    n=n//10

    print(count)
    1. A5
    2. B0
    3. C10000
    4. D1000
  4. 4What output will the following python commands produce:

    x=5
    if x%2==0:
    print(x)
    else:
    print(x,x%2)
    1. A5
    2. B5 1
    3. C2
    4. D5 0
  5. 5What is the output of the following statements?

    pi=float(3.14159)
    print(pi)
    1. A3
    2. B3.0
    3. C3.14159
    4. D0
  6. 6Expressions evaluate to either True or False:. What will the output of the following code be when the expression "Ni!" is evaluated?

    if "Ni!"
    print("We are the knights who say, "Ni!")
    else
    print("Stop it! No more of this!")
    1. AStop it!
    2. BWe are the knights who say, "Ni!"
    3. CStop it! No more of this!
    4. DNo output will be produced
  7. 7What output will the following python commands produce:

    x=1
    y=2
    if x==y:
    print(x,"and",y,"are equal")
    else
    if x<y:
    print(x,"is less than", y)
    else
    print(x,"is greater than",y)
    1. A1 and 2 are equal
    2. B1 is less than 2
    3. C1 is greater than 2
    4. D2 is greater than 2
  8. 8The following code is an example of what principle?

    bruce=5
    print(bruce,)
    bruce=7
    print(bruce)
    1. AMultiple Assignment
    2. BAn iteration or loop structure
    3. CA logical operator
    4. DA conditional operator
  9. 9The % or modulus operator returns the remainder present when two integers do not divide evenly into one another
    1. AVerdadeiro
    2. BFalso
  10. 10An algorithm is a step by step process for solving a problem
    1. AVerdadeiro
    2. BFalso

Informações

Descrição
AS - Level Computer Science (CS 1101 Python) Quiz sobre CS 1101 Week 5 , criado por Troy Bowlin em 18-05-2016.
Idioma
English
Visualizações
159
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?