Assessment Access

Please enter the access code provided by your tutor.

Incorrect access code. Please check with your tutor.

Python Diagnostic Assessment

Estimated Time: 30 to 45 Minutes
20 Questions
Instructions:

Start at Part 1 and work your way down. If you reach a point where you get stuck or don't know the answer, that is completely okay! Just leave the remaining questions blank and hit submit at the bottom. This helps us find your perfect starting line.

Part 1: Programming Basics

1. Write a line of code that creates a variable named age, assigns it the value of your age, and prints it out.
2. What is the data type of "10" (with quotes) in Python?
3. What will be the output of the following code?
x = 5 y = 2 print(x + y * 2)

Part 2: Control Flow & Logic

4. Write a script that checks a variable called temperature. If it's greater than 30, print "It's hot!". Otherwise, print "It's nice outside.".
5. Write a loop that prints the numbers from 1 to 5.
6. Look at the code below. What will it print?
total = 0 for i in range(3): total += i print(total)

Part 3: Data Structures & Functions

7. Given the list fruits = ["apple", "banana", "cherry"], how do you change "banana" to "blueberry"?
8. Create a simple dictionary named user that stores a person's name and city.
9. Write a function named greet that takes a name as an argument (e.g., "Alice") and returns a string like "Hello, Alice!".

Part 4: Problem Solving & Concepts

10. This code is supposed to check if a number is even, but it contains syntax errors. Fix it:
def is_even(num) if num % 2 = 0: return True
11. (Optional) If you know what a list comprehension is, convert this loop into one:
squares = [] for x in range(5): squares.append(x * x)
12. What does the following code print?
numbers = [1, 2, 3] print(len(numbers))
13. Write a function that returns the largest of two numbers.
14. Write a program that prints only the even numbers from 1 to 10.

Part 5: Real Programming Tasks

15. Create a list called grades with at least 5 numbers in it. Then print the highest grade.
16. Write code that asks the user for their name and then prints: "Welcome, NAME!"
17. What is the purpose of an import statement in Python?
18. Fix the error in this code:
my_list = [1, 2, 3] print(mylist)

Part 6: Advanced & Optional Challenge Questions

19. Write a list comprehension that creates a list of even numbers from 0 to 10.
20. Tell us about any Python projects, games, bots, websites, or tools you have built before.
Thank you! Your responses have been sent to your tutor. We will review these together during our first session.