Python programming language

Beschreibung

Quiz am Python programming language, erstellt von Sam Gue am 25/05/2014.
Sam Gue
Quiz von Sam Gue, aktualisiert more than 1 year ago
Sam Gue
Erstellt von Sam Gue vor mehr als 10 Jahre
40
1

Zusammenfassung der Ressource

Frage 1

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

Frage 2

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

Frage 3

Frage
If statements: what are the other statements?
Antworten
  • Elseif and Else
  • Elif and Else

Frage 4

Frage
Loops: How do you form a while loop?
Antworten
  • while 'X' then:
  • while 'X':

Frage 5

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

Frage 6

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

Frage 7

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

Frage 8

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

Frage 9

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

Frage 10

Frage
Procedures: What does a procedure lack as opposed to a User Defined Function
Antworten
  • return X
  • def procedure_name():
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Useful String Methods
Shannon Anderson-Rush
Historical Development of Computer Languages
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