Python programming language

Descripción

Test sobre Python programming language, creado por Sam Gue el 25/05/2014.
Sam Gue
Test por Sam Gue, actualizado hace más de 1 año
Sam Gue
Creado por Sam Gue hace alrededor de 10 años
37
1

Resumen del Recurso

Pregunta 1

Pregunta
Variables: How do you form a variable?
Respuesta
  • variable_name = ("variable_content")
  • variable_name = ["variable_content"]
  • variable_name = {"variable_content"}
  • variable_name = "variable_content"

Pregunta 2

Pregunta
If statements: What follows an if statement?
Respuesta
  • A colon :
  • An equals =
  • A semi-colon ;

Pregunta 3

Pregunta
If statements: what are the other statements?
Respuesta
  • Elseif and Else
  • Elif and Else

Pregunta 4

Pregunta
Loops: How do you form a while loop?
Respuesta
  • while 'X' then:
  • while 'X':

Pregunta 5

Pregunta
Loops: What will this 'for loop' do?: for i in range(5):
Respuesta
  • repeat the number five forever
  • repeat something five times
  • repeat five things, five times

Pregunta 6

Pregunta
String indexing: print(word[3]), what will happen?
Respuesta
  • it will print word three times
  • it will print the third letter in word
  • it will print the third item in the list: word
  • it will print the fourth letter in word

Pregunta 7

Pregunta
Lists: how do you add something to a list?
Respuesta
  • list_name.add(value)
  • list_name.input(value)
  • append(value).list_name
  • list_name.append(value)

Pregunta 8

Pregunta
Functions: How do you form a user defined function?
Respuesta
  • define function_name(): return X
  • def function_name(): return X

Pregunta 9

Pregunta
Text Files: How do you open and close a reading text file?
Respuesta
  • file_name.open("X.txt", "r")
  • file_name.open("X.txt", "r+")
  • file_name.open("X.txt", "w")
  • file_name.open("X.txt", "a")

Pregunta 10

Pregunta
Procedures: What does a procedure lack as opposed to a User Defined Function
Respuesta
  • return X
  • def procedure_name():
Mostrar resumen completo Ocultar resumen completo

Similar

HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Historical Development of Computer Languages
Shannon Anderson-Rush
Useful String Methods
Shannon Anderson-Rush
Flvs foundations of programming dba 2
mariaha vassar
Python Quiz
karljmurphy
computer systems and programming quiz
Molly Batch
Think Python
tsilvo2001
C Programming
Miki Rana
Generations of Programming Languages
Balikkoftesi
Mapa Conceptual - Arreglos
ciroivan94