Python programming language

Descrição

Quiz sobre Python programming language, criado por Sam Gue em 25-05-2014.
Sam Gue
Quiz por Sam Gue, atualizado more than 1 year ago
Sam Gue
Criado por Sam Gue aproximadamente 10 anos atrás
37
1

Resumo de Recurso

Questão 1

Questão
Variables: How do you form a variable?
Responda
  • variable_name = ("variable_content")
  • variable_name = ["variable_content"]
  • variable_name = {"variable_content"}
  • variable_name = "variable_content"

Questão 2

Questão
If statements: What follows an if statement?
Responda
  • A colon :
  • An equals =
  • A semi-colon ;

Questão 3

Questão
If statements: what are the other statements?
Responda
  • Elseif and Else
  • Elif and Else

Questão 4

Questão
Loops: How do you form a while loop?
Responda
  • while 'X' then:
  • while 'X':

Questão 5

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

Questão 6

Questão
String indexing: print(word[3]), what will happen?
Responda
  • 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

Questão 7

Questão
Lists: how do you add something to a list?
Responda
  • list_name.add(value)
  • list_name.input(value)
  • append(value).list_name
  • list_name.append(value)

Questão 8

Questão
Functions: How do you form a user defined function?
Responda
  • define function_name(): return X
  • def function_name(): return X

Questão 9

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

Questão 10

Questão
Procedures: What does a procedure lack as opposed to a User Defined Function
Responda
  • return X
  • def procedure_name():

Semelhante

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