Which of the following is the correct Swift playground statement that is used to assign a new variable with the name total and initialize it to 5?
PC4.8-PC4.9 CSC403 T2

Quiz
•
Computers
•
9th Grade
•
Hard
Shukria Arshe
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
create total = 5
var total = 5
declare total = 5
variable total = 5
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the value of variable Time2 after executing the code segment below?
0
7
13
20
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following refers to the value of variable count after executing the code fragment above?
1
3
5
6
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following conditions makes the character collect exactly five gems in the code segment below?
counter>4
counter>5
counter>7
counter>10
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
.
Which of the following is false?
You cannot declare the same variable name more than once within a block,
You cannot declare the same variable name more than once within a block, even if a block contains other blocks.
A class’s instance variables override locally declared variables with the same names that are declared within the class’s methods.
A variable ceases to exist, or goes out of scope, at the end of the block in which it is declared.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A variable whose scope is located to the program, it can be used and updated by any part of the code. this scope is typically derived from the variable being declared (created) outside of any function, object, or method
Global Variable
Small Variable
Limited Variable
wideVariable
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A variable with a scope is one that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables.
Global Variable
Local Variable
Limited Variable
wideVariable
Create a free account and access millions of resources
Similar Resources on Quizizz
11 questions
Introduction to Variables

Quiz
•
9th Grade
15 questions
Code.org Unit 5 Lesson 15 Assessment

Quiz
•
9th - 12th Grade
13 questions
PLTW Activity 1.1.4 Guess a Number

Quiz
•
9th Grade
10 questions
Unit 1 Review AP CSP

Quiz
•
9th - 12th Grade
10 questions
PC1.8 Evaluate computer program

Quiz
•
9th Grade
10 questions
Visual Basic Intro Quiz

Quiz
•
9th - 12th Grade
10 questions
Code.org Unit 5 Vocab Quiz 1

Quiz
•
9th - 12th Grade
11 questions
CMU CS Academy Unit 2 Part 6 Global Variables and Scope

Quiz
•
9th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade