8525 Python Questions

8525 Python Questions

10th Grade

24 Qs

quiz-placeholder

Similar activities

2.2 J277 File handling

2.2 J277 File handling

10th - 12th Grade

23 Qs

Python бағдарламау тілінен тест сұрақтары

Python бағдарламау тілінен тест сұрақтары

9th - 12th Grade

21 Qs

AQA GCSE Computer Science Paper 1

AQA GCSE Computer Science Paper 1

9th - 11th Grade

20 Qs

Programming Fundamentals Part 2

Programming Fundamentals Part 2

9th - 11th Grade

20 Qs

Процедура және функция

Процедура және функция

10th Grade

20 Qs

Computer Applications

Computer Applications

9th - 12th Grade

20 Qs

Python Intermediate Quiz (Including pygame)

Python Intermediate Quiz (Including pygame)

3rd - 12th Grade

20 Qs

2.2 Programming techniques

2.2 Programming techniques

10th - 11th Grade

24 Qs

8525 Python Questions

8525 Python Questions

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Colin Smethurst

Used 1+ times

FREE Resource

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct data type for storing a person's age in Python?

String

Integer

Float

Boolean

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

1stVariable

first_variable

first-variable

first variable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet? ```python x = 5 y = 10 print(x + y) ```

15

510

5

10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a function in Python?

def my_function():

my_function = ()

my_function[]

my_function{}

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'return' statement in a function?

To print the output

To exit the function

To send back a value from the function

To define a function

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to read a file in Python?

file.read()

file.open()

file.write()

file.close()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to open a file named "data.txt" for reading?

open("data.txt", "r")

open("data.txt", "w")

open("data.txt", "a")

open("data.txt", "x")

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?