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
Exam (elaborations)

CSCI 1170 FINAL EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
29-05-2026
Written in
2025/2026

CSCI 1170 FINAL EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026 The Python interpreter is a program that can read Python programming statements and execute them T or F - Answers T A Python variable name cannot begin with a digit T or F - Answers T In Python math expressions are evaluated from left to right, no matter what the operators are T or F - Answers F The % symbol is the percentage operator and is also known as the precedence operator T or F - Answers F Statements in the loop body of a WHILE statement will NOT be executed if the predicate initially evaluates to FALSE T or F - Answers T Converting programming instructions to machine instructions is a function of - Answers compilers A bit is - Answers an element of a byte and can be "off" or "on" A cursor is a - Answers symbol that shows where the next character will be entered on the screen The part of a record that is used to store individual facts or data items is called - Answers a field Which of the following is NOT true of comments in Python a) they can begin anywhere on a line b) they are optional text included by the programmer c) they translate into one machine language instruction d) they are preceded by the symbol # - Answers c Evaluating the expression [3 // 2 - 3.0 / 2] yields the value - Answers -.5 Which of the following is NOT legal syntax of a floating point value a) 3.1415 b) 31415 c) 31415. d) 3.1415E-4 - Answers b The predicate of a WHILE is - Answers evaluated before each iteration of the loop The ____________ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program - Answers input Memory is said to be ______________ if data and programs are erased when the power to a computer is turned off - Answers volatile The line continuation character is a - Answers Which mathematical operator is used to raise 5 to the second power in Python - Answers ** In Python names of variables and names of functions are all generically known as - Answers identifiers The form of a program that we as programmers modify with an editor is called the _____________ program and might be stored in the file - Answers source After execution of the statement [ sold = 256.752 ] the variable [ sold ] will reference the numeric literal value as a(n) __________ data type - Answers float After execution of the statement [ price = int(68.549) ] the variable [ price ] will reference the value - Answers 68 Where does a computer store a program and the data that the program is working with while the program is running - Answers primary storage Exactly 2^20 bytes is called a a) Terabyte b) Kilobyte c) Gigabyte d) None of these - Answers d What type of error is it when Reeborg performs the wrong task - Answers logic error UNIX command to list the names of of all files in the current directory - Answers ls UNIX command to remove the file - Answers rm UNIX command to change current directory from home to OLA - Answers cd OLA UNIX command to make a copy of the file called - Answers cp UNIX command to create a directory called unixstuff - Answers mkdir unixstuff UNIX command to display contents of onto the screen a page at a time - Answers more A system or language that distinguishes between upper and lowercase letters is said to be ____________ - Answers case sensitive What are three types of program maintenance - Answers corrective adaptive perfective What will the following statements cause the computer to print x = 99 y = 444 z = x x = y y = z print(x) print(y) - Answers 444 99 The main reason for using secondary storage is to hold data for long periods of time, even when the power supply to the computer is turned off T or F - Answers T According to the behavior of integer division in Python when an integer is divided by an integer the result will be a float T or F - Answers F Python allows programmers to break a statement into multiple lines T or F - Answers T In Python the assignment operator and the equality operator are represented the same way T or F - Answers F Reducing duplications of code is one of the advantages of using a loop structure T or F - Answers T Assuming [number] has an integer value the clause [if not (number9):] is equivalent to the clause [if (number10): ] T or F - Answers F Python allows you to compare strings T or F - Answers T In Python an identifier cannot start with a digit T or F - Answers T Semantics is the term used when we refer to the meaning of a statement T or F - Answers T Both of the following [for] classes would generate the same number of loop iterations: for num in range(4): for num in range(1,5): T or F - Answers T Which would be a poor choice for a sentinel value a) 999 for voter_age b) 1 for test_score c) 13 for birthday_month d) 75 for car_speed e) b and d - Answers e Which assignment statement could be used to store the symbol @ into the variable at_sign a) at_sign = "@" b) at_sign = @ c) at_sign = '@' d) a and c e) a b and c - Answers d How many bits are in one byte - Answers 8 What values of num will print given the code fragment for num in range(2,9,2) print(num) - Answers 2 4 6 8 What is the output of the following program fragment x = 25.628499 print('$',format(x,'6.2f'),'7d') - Answers $--25.63-7d What is the output of the following program fragment alpha = 20 beta = 100 print( alpha, beta, format(alpha/beta,'.1%') - Answers 20-100-20.0% How many lines of output are produced by the following program fragment n = 5 print("Item A", "Item BnItem C", "Item D", end="") candidate = "Item E" print(n, candidate) candidate = "ItemnF" print(candidate,n,sep='*') - Answers 3 If the variables i ,j, and k contain the integer values 10, 3, 20 (respectively), what is the value of the following boolean expression ( i 4 and ( j == 5 or i = k) ) - Answers False If [flag] contains a boolean value, which of the following boolean expressions always evaluates to the value [False] a) flag and flag b) flag or flag c) flag and not flag d) flag or not flag e) b and d - Answers c Using De Morgan's Law, negating the expression (ij) and (k==x) yields - Answers (i=j) or (k!=x) Which of the following Python statements could be used to read a word from std input into the variable [term] a) cin term b) term = input('Enter word: ') c) read(term) d) input(term) e) term = int(read('word')) - Answers b The part of a record that is used to store individual facts or data items is called - Answers a field What is the value of count after control exits the following loop alpha = 0 count = 10 while count = 145: alpha = alpha + 7 count += 1 - Answers 146 What is not an example of an augmented assignment operator a) *= b) /= c) **= d) = e) %= - Answers d The first input operation is called the _______________ and its purpose is to get the first input value that will be tested by the predicate of the validation loop - Answers priming read 5 + 5 // 10 = ? - Answers 5 23 % 4 = ? - Answers 3 -2.5 = 2.5 ? - Answers True ( 2 * 12.5 ) / 2 = ? - Answers 12.5 - ( -4.1) = ? - Answers 4.1 2 ** 10 = ? - Answers 1024 "xy" "abcd" = ? - Answers True 'hi' == "hi" - Answers True Write a Python assignment statement that assigns the variable y the result of evaluating the mathematical expression [9n^2 +5n] / [n-2.5] - Answers y = (9 * (n ** 2) + 5 * n) / (n -2.5) Write a Python statement that triples the value of the variable num - Answers num = num *3 Briefly what is a short-circuit - Answers [Edit] Complete the following truth table r h r and h r or h ------ ------- ------------- ----------

Show more Read less
Institution
CSCI 1170
Course
CSCI 1170

Content preview

CSCI 1170 FINAL EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

The Python interpreter is a program that can read Python programming statements and execute them

T or F - Answers T
A Python variable name cannot begin with a digit

T or F - Answers T
In Python math expressions are evaluated from left to right, no matter what the operators are

T or F - Answers F
The % symbol is the percentage operator and is also known as the precedence operator

T or F - Answers F
Statements in the loop body of a WHILE statement will NOT be executed if the predicate initially
evaluates to FALSE

T or F - Answers T
Converting programming instructions to machine instructions is a function of - Answers compilers
A bit is - Answers an element of a byte and can be "off" or "on"
A cursor is a - Answers symbol that shows where the next character will be entered on the screen
The part of a record that is used to store individual facts or data items is called - Answers a field
Which of the following is NOT true of comments in Python

a) they can begin anywhere on a line
b) they are optional text included by the programmer
c) they translate into one machine language instruction
d) they are preceded by the symbol # - Answers c
Evaluating the expression [3 // 2 - 3.] yields the value - Answers -.5
Which of the following is NOT legal syntax of a floating point value

a) 3.1415
b) 31415
c) 31415.
d) 3.1415E-4 - Answers b
The predicate of a WHILE is - Answers evaluated before each iteration of the loop
The ____________ function reads a piece of data that has been entered at the keyboard and returns
that piece of data, as a string, back to the program - Answers input
Memory is said to be ______________ if data and programs are erased when the power to a
computer is turned off - Answers volatile
The line continuation character is a - Answers \
Which mathematical operator is used to raise 5 to the second power in Python - Answers **
In Python names of variables and names of functions are all generically known as - Answers
identifiers
The form of a program that we as programmers modify with an editor is called the _____________
program and might be stored in the file hurdles17.py - Answers source
After execution of the statement [ sold = 256.752 ] the variable [ sold ] will reference the numeric
literal value as a(n) __________ data type - Answers float
After execution of the statement [ price = int(68.549) ] the variable [ price ] will reference the value -
Answers 68
Where does a computer store a program and the data that the program is working with while the
program is running - Answers primary storage
Exactly 2^20 bytes is called a

a) Terabyte
b) Kilobyte
c) Gigabyte

, d) None of these - Answers d
What type of error is it when Reeborg performs the wrong task - Answers logic error
UNIX command to list the names of of all files in the current directory - Answers ls
UNIX command to remove the file boxes.wld - Answers rm boxes.wld
UNIX command to change current directory from home to OLA - Answers cd OLA
UNIX command to make a copy of the file hurdles.py called backup.py - Answers cp hurdles.py
backup.py
UNIX command to create a directory called unixstuff - Answers mkdir unixstuff
UNIX command to display contents of hurdles.py onto the screen a page at a time - Answers more
hurdles.py
A system or language that distinguishes between upper and lowercase letters is said to be
____________ - Answers case sensitive
What are three types of program maintenance - Answers corrective adaptive perfective
What will the following statements cause the computer to print

x = 99
y = 444

z=x
x=y
y=z

print(x)
print(y) - Answers 444
99
The main reason for using secondary storage is to hold data for long periods of time, even when the
power supply to the computer is turned off

T or F - Answers T
According to the behavior of integer division in Python when an integer is divided by an integer the
result will be a float

T or F - Answers F
Python allows programmers to break a statement into multiple lines

T or F - Answers T
In Python the assignment operator and the equality operator are represented the same way

T or F - Answers F
Reducing duplications of code is one of the advantages of using a loop structure

T or F - Answers T
Assuming [number] has an integer value the clause [if not (number>9):] is equivalent to the clause [if
(number<10): ]

T or F - Answers F
Python allows you to compare strings

T or F - Answers T
In Python an identifier cannot start with a digit

T or F - Answers T
Semantics is the term used when we refer to the meaning of a statement

T or F - Answers T
Both of the following [for] classes would generate the same number of loop iterations:
for num in range(4):

Written for

Institution
CSCI 1170
Course
CSCI 1170

Document information

Uploaded on
May 29, 2026
Number of pages
7
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.49
Get access to the full document:

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

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.
joshuawesonga22 Liberty University
Follow You need to be logged in order to follow users or courses
Sold
100
Member since
1 year
Number of followers
1
Documents
14186
Last sold
1 day ago
Tutor Wes

Hi there! I'm Tutor Wes, a dedicated tutor with a passion for sharing knowledge and helping others succeed academically. All my notes are carefully organized, detailed, and easy to understand. Whether you're preparing for exams, catching up on lectures, or looking for clear summaries, you'll find useful study materials here. Let’s succeed together!

3.9

9 reviews

5
4
4
1
3
3
2
1
1
0

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

Working on your references?

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

Working on your references?

Frequently asked questions