8525 Python Questions

Quiz
•
Computers
•
10th Grade
•
Medium
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
Similar Resources on Wayground
20 questions
VERIFICA M5 Sistemi operativi

Quiz
•
10th Grade
20 questions
Surprise Quiz !!!!

Quiz
•
10th Grade
20 questions
Python (Пайтон) работа с файлами

Quiz
•
10th Grade
20 questions
U01 - Command Line & Binary/Decimal Test

Quiz
•
9th - 12th Grade
24 questions
Teknoloji ve Yazılım 1. Dönem 1. Yazılı (Python)

Quiz
•
6th Grade - University
20 questions
GCSE Computer Science: Programming (Data Structures)

Quiz
•
9th - 10th Grade
20 questions
Linux Directory Structures

Quiz
•
10th Grade - University
20 questions
5e•12-01•Évaluation•Question•01

Quiz
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade