Basics Python

Flashcard
•
Computers
•
8th - 10th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Sophia is learning programming and wants to know how to define(assign) variables. Which of the following is the correct way? Options: var="String", func==Hello, var : 123, word= Hello
Back
var="String"
Answer explanation
The correct way to define a variable in programming is using the syntax 'var="String"'. This assigns the string value 'String' to the variable 'var'. The other options are incorrect due to syntax errors.
2.
FLASHCARD QUESTION
Front
Emma is writing a program and wants to insert a command that will take the output to the next line. Which one should she use? Options: \t, \n, /n, \\
Back
\n
Answer explanation
Emma should use '\n' to insert a newline in her program. This escape sequence represents a line break, while '\t' adds a tab, '/n' is incorrect, and '\' is an escape character without a specific function here.
3.
FLASHCARD QUESTION
Front
Michael is learning to code and wants to know the command used to display numbers and text on the screen. What should he use?
Back
Answer explanation
Michael should use the 'Print' command to display numbers and text on the screen. This command is commonly used in many programming languages to output information to the console.
4.
FLASHCARD QUESTION
Front
Priya is writing a Python program to calculate the total cost of items in a shopping cart. What symbol should she use to assign the total cost to a variable?
Back
=
Answer explanation
In Python, the '=' symbol is used for assignment. Priya should use '=' to assign the total cost of items in the shopping cart to a variable. The other options do not serve this purpose.
5.
FLASHCARD QUESTION
Front
Abigail is writing a Python script and wants to include a line that Python won't try to run as code. What should she use?
Back
Comment
Answer explanation
In Python, comments are used to include notes or explanations in the code that the interpreter ignores. Abigail should use a comment (preceded by #) to ensure that the line is not executed as code.
6.
FLASHCARD QUESTION
Front
Kai is learning about data types in his computer science class. He comes across a data type that can have one of two values: True or False. What is this data type called?
Back
Boolean
Answer explanation
The data type that can have one of two values, True or False, is called a Boolean. This is fundamental in programming for making decisions and controlling the flow of execution.
7.
FLASHCARD QUESTION
Front
Maya is organizing a coding workshop and needs to choose the correct data type for storing the number of participants. What data type should she use for a whole number?
Back
Integer
Answer explanation
Maya should use the Integer data type to store the number of participants, as it is designed for whole numbers. Float is for decimal numbers, Boolean for true/false values, and String for text.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
SLO Artifact III

Flashcard
•
9th - 12th Grade
14 questions
Języki Programowania

Flashcard
•
9th Grade
8 questions
Python

Flashcard
•
KG - 9th Grade
10 questions
Chủ đề 4 - Tin 8

Flashcard
•
KG
10 questions
S3 page1 Flashcards

Flashcard
•
9th Grade
10 questions
Python

Flashcard
•
7th - 8th Grade
8 questions
Understanding Event Functions and onStep in Python

Flashcard
•
9th Grade
15 questions
Conditional Statements

Flashcard
•
9th 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
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

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

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

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

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

Quiz
•
9th - 12th Grade