CMU Unit 1 Practice Test

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Joshua Ottoson
Used 20+ times
FREE Resource
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
All of the following are types of errors EXCEPT:
Syntax Error
Logical Error
Cascade Error
Runtime Error
2.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Logical Error
Code follows the rules of Python and runs, but crashes after it starts.
Code doesn't run because program doesn't follow the rules of Python.
Code runs, but doesn't do what we want it to do.
Code runs and works perfectly.
3.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Runtime Error
Code follows the rules of Python and runs, but crashes after it starts.
Code doesn't run because program doesn't follow the rules of Python.
Code runs, but doesn't do what we want it to do.
Code runs and works perfectly.
4.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Syntax Error
Code follows the rules of Python and runs, but crashes after it starts.
Code doesn't run because program doesn't follow the rules of Python.
Code runs, but doesn't do what we want it to do.
Code runs and works perfectly.
5.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Which of the following has an error?
Rect(50, 50, 200, 300, fill='dodgerBlue')
Line(0, 200, 400, 200)
Circle(300, 200, 75, fill='crimson')
RegularPolygon(200 200 20 3)
Answer explanation
The Rect has no commas between the numbers. This command is not following the rules of Python - it is a syntax error!
6.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Which of the following has an error?
Circle(200, 200, fill='black')
Line(0, 200, 400, 200, lineWidth=2)
Polygon(100, 100, 150, 150, 200, 200, fill='blue')
Rect(0,0,100,200,fill=None)
Answer explanation
The circle command takes a minimum of 3 inputs: Circle(centerX, centerY, radius). This was missing the radius number - a syntax error.
7.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Which of the following has an error?
Polygon(100, 200, 300, 300, fill=None)
Circle(-100, -100, 200, fill=gradient('red', 'orange', 'yellow',
start='left-top'))
Rect(350, 50, 50, 50, fill='blue', borderWidth=5)
Polygon(150, 160, 180)
Answer explanation
To draw a polygon with code, we write: Polygon(x1, y1, x2, y2, x3, y3, …). It must have an even number of coordinates! For this question, we wrote x1, y1,x2, but we forgot to put y2! This is not following the rules of Python - a syntax error.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Computer Science Discoveries Unit 3 L1 - L 9

Quiz
•
7th - 12th Grade
20 questions
CMU Unit 1 Practice Test

Quiz
•
9th - 12th Grade
19 questions
Carnegie CMU Graphics in Python Explore Programming

Quiz
•
9th - 12th Grade
27 questions
Java Swing/AWT Graphics

Quiz
•
9th - 12th Grade
22 questions
Python Pygame

Quiz
•
12th Grade
21 questions
P5.js Exam 1

Quiz
•
9th - 12th Grade
20 questions
Python while loops

Quiz
•
12th Grade
21 questions
Javascript Debugging Review

Quiz
•
9th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade