
Python Programming Basics Flashcard
Flashcard
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

9 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What will be the output?
name = "Dave"
print ("name")
Back
name
2.
FLASHCARD QUESTION
Front
A programmer wants to write a while loop that continues to run as long as the user's input is less than 100. Which of the following is the correct loop condition? Options: while user_input < 100:, while user_input > 100:, while user_input == 100:, while user_input != 100:
Back
while user_input < 100:
3.
FLASHCARD QUESTION
Front
What will be the output of the following Python code?
favorite_colors = ['red', 'blue', 'green', 'yellow']
favorite_colors.append('purple')
print(len(favorite_colors))
Back
5
4.
FLASHCARD QUESTION
Front
Given the dictionary students = {'John': 10, 'Jane': 11, 'Joe': 10}, what is the correct way to print Jane's age?
Back
print(students['Jane'])
5.
FLASHCARD QUESTION
Front
What is the output of the following code?
Python code block:
def is_even(number):
if number % 2 == 0:
return True
else:
return False
print(is_even(9))
Back
False
6.
FLASHCARD QUESTION
Front
Which line of code correctly opens a file named data.txt to add new information without erasing existing content? Options: file = open('data.txt', 'r'), file = open('data.txt', 'w'), file = open('data.txt', 'a'), file = open('data.txt', 'x')
Back
file = open('data.txt', 'a')
7.
FLASHCARD QUESTION
Front
What is the output if the user types "Python"?
Back
Try again!
8.
FLASHCARD QUESTION
Front
What does the following algorithm do?
Back
Add up all the numbers between (and including) 1 and 5
9.
FLASHCARD QUESTION
Front
What control structure would be best to use in the following code? Options: A function, A while loop, A for loop, An if/else statement
Back
A for loop
Similar Resources on Wayground
11 questions
7517 05 Structured Programming
Flashcard
•
10th Grade - University
5 questions
PLTW CSE Unit 1 Flashcard 1
Flashcard
•
12th Grade
10 questions
Primary Storage Concepts
Flashcard
•
KG
5 questions
Laptops and Mobile Device Check for Understand
Flashcard
•
9th - 12th Grade
4 questions
Level 5 The Persian Empire
Flashcard
•
11th Grade
5 questions
HCI - von Restorff Effect
Flashcard
•
University
10 questions
Last Child & Walden Vocab
Flashcard
•
11th Grade
8 questions
Flashcard on Intro to Recon & Google Dorking
Flashcard
•
12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade