Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

INTRODUCTION TO COMPUTER PROGRAMMING (EXAM 1) QUESTIONS WITH CORRECT ANSWERS

Document preview thumbnail
Preview 2 out of 14 pages

INTRODUCTION TO COMPUTER PROGRAMMING (EXAM 1) QUESTIONS WITH CORRECT ANSWERS

Content preview

INTRODUCTION TO COMPUTER
PROGRAMMING (EXAM 1)

Algorithms - Correct Answers -A series of well-defined, logical steps that must be taken
in order to perform a task. They serve as a necessary intermediate step between
understanding the task at hand and translating it into computer code.

Sources of input - Correct Answers -User (keyboard, mouse, etc.), hardware (scanner,
camera, etc.), data (file, the Internet, etc.)
Output - Correct Answers -Some kind of tangible/visible/readable product is constructed
(screen display, printout, 3D fabrication)

IDLE - Correct Answers -Integrated DeveLopment Environment; has two modes

IDLE: Interactive mode - Correct Answers -commands are immediately processed as
they are received

Pocessing - Correct Answers -A series of mathematical or logical processes that are
applied to the input

IDLE: Script mode - Correct Answers -allows programmer to write a program (saved as
a "Text file" on your computer) and then your commands can be processed whenever
you like

Function - Correct Answers -1. a pre-written piece of computer code that will perform a
specific action or set of actions.

2. Python comes with many built-in functions and you can also write your own.

3. Functions always begin with a keyword followed by a series of PARENTHESIS

4. You can pass one or more arguments into a function by placing data inside the
parenthesis. Different functions expect different numbers of arguments and different
argument types

5. "Calling" a function means that you ask Python to run a function

, Strings - Correct Answers -1. Data that is textual in nature

2. Can contain 0 or more printed characters

String literals - Correct Answers -1. strings that you define inside of your program

2. hard-coded values

3. must be delimited using a special character (" or ' or """ or ''') so that Python knows
the characters you typed should be treated as text/string and not a function call

Line endings - Correct Answers -1. Python automatically places a newline character at
the end of each line

2. to override this use the 'end' argument at the end of the line, MUST be at the end

e.g.
print("one",end="")
print("two",end="")
# output: onetwo

Separating print() function arguments - Correct Answers -1. By default Python places a
space in between arguments that you use in print() function calls

2. to override this use the 'sep' argument at the end of the line, MUST be at the end

e.g.
print("one","two",sep="*")
# output: one*two

Escape characters - Correct Answers -1. allows you to perform special actions inside of
the confines of a delimiter

2. In Python the escape character is "\"

3. it causes Python to treat the next character as "special", which in most cases means
you ignore the next character to prevent it from taking on its regular meaning which in
some cases will mess up your program/delimiter

e.g.
print('Hi, it\'s Ellie')
# output: Hi, it's Ellie

Escape characters: conjunctions - Correct Answers -1. \n forces a line break

2. \t forces a tab

Document information

Uploaded on
October 3, 2025
Number of pages
14
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

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.
millyphilip
3.6
(555)
Sold
2968
Followers
1963
Items
46205
Last sold
19 hours 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