• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

EECS 1015 midterm || with Complete Solutions.

Document preview thumbnail
Preview 2 out of 10 pages

EECS 1015 midterm || with Complete Solutions.

Content preview

EECS 1015 midterm || with Complete Solutions.
Computer programming correct answers gives instructions -> computer will do exactly
- a program must follow the syntax strictly -> interpreter/compiler can recognize

Debugging correct answers - find out what goes wrong & fix it
- is an interactive procedure

How does computer take instructions? correct answers high-level language -> interpreter &
compiler -> low-level language (machine code)

Literals correct answers Numerical literal: integer, float
String literal: a sequence of characters
Boolean literal: true/ false
Non-literal: data that have no type (null/ sth else)

Variables correct answers - cannot begin with a number
- begin with a letter/ underscore_
- case-sensitive
- only contain alpha-numeric characters & underscores

Operations correct answers manipulate literals/ operations
- arithmetic operators: + - * /
- assignment operators: assigning: =
- comparison operators: == != >= <= > <
- logical operators: not and or
- bitwise operators
- etc.

collection of literals correct answers list: has order
set
dictionary

expressions correct answers a combination of literals, variables, operators, and function calls
that produce a result when evaluated.

statements correct answers a unit of code that has an effect
a piece of code that performs an action

if statement correct answers condition -> action

loops correct answers repeating & more
used to execute a block of code repeatedly based on a specified condition or for a
predetermined number of iterations.

functions correct answers - built-in / write it on your own
- reusable block of code that performs a specific task.
- help to reuse your instructions/code
- make code more concise/readable

, classes correct answers - a blueprint/template for creating objects.
- define your own data type
- define functions in a class -> manipulate it

computer programming vs computer science correct answers computer programming:
- focus on writing code
- create computer processes

computer science:
- includes computer programming, but broader
- studies computer processes (e.g., develop theories): data structures, algorithms (e.g., sorting
data), database theory, developing mathematical models, improving efficiency and
performance.

IDE correct answers Integrated Development Environment

Compiler vs Interpreter correct answers Compiler: converts the entire code high -> low, a
program that converts all instructions into machine code so that they can be read and
executed by a computer
Interpreter: converts high -> low, line-by-line, a program that analyzes and executes each line
of code

Script mode vs Interactive mode correct answers Script mode: not show variable's value, file
can be saved & reopened

interactive mode: show value after hit 'enter', progress is lost if restart, quick testing

Precedence of expressions correct answers Highest
() parathesis
** exponential
- negation
* multiplication, / division, // integer division, % modulo
+ addition, - subtraction
Lowest

String representation correct answers - alphabet (case-sensitive), numbers, special characters
in double/single quote
- triple quote: texts in multiple lines (paragraph)

R String correct answers - add r/R before string
- include the character after the escape characters
- misconception: treat the backslashes \ as a regular character

in bool type: correct answers true: anything that is not 0/none
false: otherwise

lexicographical order correct answers Small
'' empty string
' ' space
0-9 digits

Document information

Uploaded on
November 19, 2025
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
SirAnton
3.7
(118)
Sold
810
Followers
438
Items
40067
Last sold
5 days ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions