100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Scripting and Programming - Foundations - C173 Exam Questions and Answers 2025

Rating
-
Sold
-
Pages
11
Grade
A+
Uploaded on
26-01-2025
Written in
2024/2025

What is an editor? -Correct Answer A program that allows you to write code What is a compiler? -Correct Answer A program that produces other programs. The compiler does all the work at once and then runs the new program. We're translating the code we wrote to computer code all at once. This is often when we produce an .exe (executable) file. What is an interpreter? -Correct Answer A program that runs code one line at a time. Instead of converting all of the code at once it runs each line as it's needed. It interprets that specific line from your code to computer code. What is an operator and what does it do? -Correct Answer An operator takes two operands (values) and does something with them. It is an object capable of manipulating a value. If it is a comparison or logical operator it would compare to see if they are similar or dissimilar. If it is a mathematical operator it would perform mathematical calculations. What is an expression? -Correct Answer something that has a value. What is the difference in a terminal and non-terminal expression? -Correct Answer A terminal is a final value, while a non-terminal can be reduced further. What is proper Python grammar for making an expression? -Correct Answer Expression → Expression Operator Expression The Expression non-terminal that appears on the left side can be replaced by an Expression, followed by an Operator, followed by another Expression. For example, 1 + 1 is an Expression Operator Expression. What is a variable? -Correct Answer a name that refers to a value What are the three main types of data covered? How do you declare each one? -Correct Answer string is a sequence of characters surrounded by quotes, either single or double example: myVar = "string data" Integer is a number -Correct Answer example: myVar = 33 Boolean is a true or false value -Correct Answer example: myVar = True What is grammar used for in programming? -Correct Answer In a programming language like Python, the code must match the language grammar exactly. When programming language grammar is not followed the interpreter will return a Syntax Error message. This means that the structure of the code is inconsistent with the rules of the programming language. How do you change the value of a variable with Python? -Correct Answer Using the = character to assign a new value x = 6 x = 9 print x # would print out 9 How to do you join multiple variables together with string data in Python? What is this called? -Correct Answer Using the + sign to concatenate the values What does it mean to index a string? How do you do that with Python code? -Correct Answer This is what we call selecting a sub-sequence of a string. You do this in Python by specifying the character you want to access by its index position. Index position begins at 0. For example, this code would print out the letter J: name = 'John' print name[0] What does it mean to slice a string? How do you do that with Python code? -Correct Answer Slicing is simply obtaining a subset of data from a string. You may have also heard this called string extraction. You do this in Python by specifying the index position where you want to begin and where you want to end. Everything from the starting point up until the end point will be extracted. For example, this code would print out "Jo": name = 'John' print name[0:2] + -Correct Answer concatenate or add = -Correct Answer assignment * -Correct Answer multiply - -Correct Answer subtract / -Correct Answer divide % -Correct Answer Modulos, does division and returns the remainder What does the * operator do when applied to string data? -Correct Answer It writes out the string data multiple times. For example, print '!' * 12 would output !!!!!!!!!!!! (12 exclamation points).

Show more Read less
Institution
Scripting And Programming - Foundations - C173
Course
Scripting and Programming - Foundations - C173









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Scripting and Programming - Foundations - C173
Course
Scripting and Programming - Foundations - C173

Document information

Uploaded on
January 26, 2025
Number of pages
11
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • c173 exam

Content preview

Scripting and Programming - Foundations - C173



Scripting and Programming - Foundations - C173
Exam Questions and Answers 2025
What is an editor? -Correct Answer ✔A program that allows you to write code

What is a compiler? -Correct Answer ✔A program that produces other programs. The
compiler does all the work at once and then runs the new program. We're translating the
code we wrote to computer code all at once. This is often when we produce an .exe
(executable) file.

What is an interpreter? -Correct Answer ✔A program that runs code one line at a time.
Instead of converting all of the code at once it runs each line as it's needed. It interprets
that specific line from your code to computer code.

What is an operator and what does it do? -Correct Answer ✔An operator takes two
operands (values) and does something with them. It is an object capable of
manipulating a value. If it is a comparison or logical operator it would compare to see if
they are similar or dissimilar. If it is a mathematical operator it would perform
mathematical calculations.

What is an expression? -Correct Answer ✔something that has a value.

What is the difference in a terminal and non-terminal expression? -Correct Answer ✔A
terminal is a final value, while a non-terminal can be reduced further.

What is proper Python grammar for making an expression? -Correct Answer
✔Expression → Expression Operator Expression
The Expression non-terminal that appears on the left side can be replaced by an
Expression, followed by an Operator, followed by another Expression. For example, 1 +
1 is an Expression Operator Expression.

What is a variable? -Correct Answer ✔a name that refers to a value

What are the three main types of data covered? How do you declare each one? -
Correct Answer ✔string is a sequence of characters surrounded by quotes, either single
or double
example: myVar = "string data"

Integer is a number -Correct Answer ✔example: myVar = 33

Boolean is a true or false value -Correct Answer ✔example: myVar = True




Scripting and Programming - Foundations - C173

, Scripting and Programming - Foundations - C173


What is grammar used for in programming? -Correct Answer ✔In a programming
language like Python, the code must match the language grammar exactly. When
programming language grammar is not followed the interpreter will return a Syntax Error
message. This means that the structure of the code is inconsistent with the rules of the
programming language.

How do you change the value of a variable with Python? -Correct Answer ✔Using the =
character to assign a new value
x=6
x=9
print x # would print out 9

How to do you join multiple variables together with string data in Python? What is this
called? -Correct Answer ✔Using the + sign to concatenate the values

What does it mean to index a string? How do you do that with Python code? -Correct
Answer ✔This is what we call selecting a sub-sequence of a string. You do this in
Python by specifying the character you want to access by its index position. Index
position begins at 0. For example, this code would print out the letter J:
name = 'John'
print name[0]

What does it mean to slice a string? How do you do that with Python code? -Correct
Answer ✔Slicing is simply obtaining a subset of data from a string. You may have also
heard this called string extraction. You do this in Python by specifying the index position
where you want to begin and where you want to end. Everything from the starting point
up until the end point will be extracted. For example, this code would print out "Jo":
name = 'John'
print name[0:2]

+ -Correct Answer ✔concatenate or add

= -Correct Answer ✔assignment

* -Correct Answer ✔multiply

- -Correct Answer ✔subtract

/ -Correct Answer ✔divide

% -Correct Answer ✔Modulos, does division and returns the remainder

What does the * operator do when applied to string data? -Correct Answer ✔It writes out
the string data multiple times. For example, print '!' * 12 would output !!!!!!!!!!!! (12
exclamation points).


Scripting and Programming - Foundations - C173

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
PossibleA Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
985
Member since
4 year
Number of followers
650
Documents
12644
Last sold
10 hours ago
POSSIBLEA QUALITY UPDATED EXAMS

Choose quality study materials for nursing schools to ensure success in your studies and future career. "Welcome to PossibleA - your perfect study assistant! Here you will find Quality sheets, study materials, exams, quizzes, tests, and notes to prepare for exams and study successfully. Our store offers a wide selection of materials on various subjects and difficulty levels, created by experienced teachers and checked for quality. Our quality sheets are an easy and quick way to remember key points and definitions. And our study materials, tests, and quizzes will help you absorb the material and prepare for exams. Our store also has notes and lecture summaries that will help you save time and make the learning process more efficient.

Read more Read less
3.9

141 reviews

5
74
4
25
3
20
2
1
1
21

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions