• 1. 
    Joining elements together to make a string is called what?

  • Combining
  • Connecting
  • Concatenation
  • Stringing
  • 2. 
    Python uses indentation to block code into chunks

  • True
  • False
  • 3. 
    Python correct naming convention for variables is?

  • new_user25
  • NewUser25
  • 25_new_user
  • 25NewUser
  • NEWUSER25
  • 4. 
    What is python named after

  • The snake
  • Television show called Monty Python
  • 5. 
    Decides if a string only contains numbers

  • isalpha()
  • isnumeric()
  • int()
  • string()
  • 6. 
    What will the following code result in:name = “Alison”number = len(name) print(number)

  • 4
  • 5
  • 6
  • 7
  • 7. 
    How do we make sure that IF statements are indented correctly?

  • Don't need to
  • Use the Tab key
  • Use the Shift Key
  • Use the Enter Key
  • 8. 
    What type of loop is used when you know how many times you want to repeat something?

  • A WHILE Loop
  • An IF function
  • A FOR Loop
  • A Variable
  • 9. 
    A variable that can only have two values, True or False.

  • Boolean
  • If
  • elif
  • else
  • 10. 
    In the following code what will happen if the wrong password is entered:while password != "computer": print("Enter Password: ") password = input()

  • It will log in
  • It will keep asking to type in password
  • 11. 
    What will the output be from the following code?print(Hello world!)

  • Hello world!
  • SyntaxError
  • Hello world
  • print(Hello world!)
  • 12. 
    Code executed based on a condition being true

  • Sequence
  • Selection
  • Iteration
  • Variable
  • 13. 
    People = ["John", "Rob", "Bob"]print (people[4]) what would this result be?

  • John
  • Rob
  • Bob
  • Error
  • 14. 
    What is printed when this program is run: days = 5 if days > 6: print(“Month”) else: print(“Week”)

  • Month
  • Week
  • Day
  • 4
  • 15. 
    What will the output be from the following code?print("Hello" + str(2) + "world!")

  • Hello world! Hello world!
  • Hello2world!
  • Hello Hello world! world!
  • SyntaxError
  • 16. 
    Code repeated / looped until a condition has been met or a set number of times.

  • Sequence
  • Selection
  • Iteration
  • Variable
  • 17. 
    People = ["John", "Rob", "Bob"]print (people[-1]) what would this result be?

  • John
  • Rob
  • Bob
  • 18. 
    What does the term 'debug' mean?

  • Identify errors and fix them.
  • Making a calculation
  • A set of instructions
  • Looking at code
  • 19. 
    What does the following code do? myAge = int (myAge)

  • Converts the var (variable) myAge to a string
  • Converts the var (variable) myAge to a integer
  • Converts the var (variable) myAge from a integer to a string
  • Converts the var (variable) myAge to if statement
  • 20. 
    What is the word used to describe repetition in programming?

  • Sequence
  • Selection
  • Iteration
  • Coding
  • 21. 
    What output will the console show, if 15 and 30 are entered by the user?

  • Syntax error
  • The sum of the two numbers - 45
  • The concatenation of the two numbers - 1530
  • Complier error
  • 22. 
    How many times does the following program print the word ‘computer’:word= "computer" for num in range(1,6): print(word)

  • 5
  • 6
  • 1
  • 0
  • 23. 
    Python identifies blocks of code by

  • BEGIN and END keywords
  • { and }
  • aligning up the starts of lines (indentation)
  • guessing
  • 24. 
    What type of loop is used when you DO NOT know how many times you want to repeat something?

  • A WHILE Loop
  • A Counter
  • A FOR Loop
  • A Forever Loop
  • 25. 
    What are the two main types of loops that we have learned about in Python?

  • IF Function & Variables
  • FOR and WHILE Loops
  • Forever and Fixed Loop
  • Data Types and Numbers
  • 26. 
    Look at the code below and identify which of the statements below are true:for loopCounter in range(10,101,10): print(loopCounter)

  • Starts at 10, goes up to 100, increases by 10
  • Starts at 10, goes upto 101, increases by 10
  • Starts at 1, goes upto 100, increases by 1
  • Starts at 10, goes upto 10, increases by 10
  • 27. 
    Which is the correct syntax?

  • has_dog = true
  • has_dog = True
  • has_dog = Treu
  • HAS_DOG = tRue
Report Question
warning
access_time
  Time