






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A compilation of final exam questions and verified answers related to data programming. It covers a range of topics including program definitions, error types, low-level languages, reserved words, code building blocks, variable storage, parsing, secondary memory functions, semantics, output, and language characteristics. The questions also delve into data types, variable naming rules, logical operators, conditional statements, functions, loops, string manipulation, and error handling. This resource is designed to help students review and reinforce their understanding of key concepts in data programming, providing a valuable study aid for exam preparation and concept reinforcement.
Typology: Exams
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Build a better you - correct answer ✅online source available through Georgia Southern to help in this class. Program - correct answer ✅A set of instructions that specifies a computation. three types of errors - correct answer ✅semantic, syntax, logic what contains machine code - correct answer ✅Python Interpretor What is not a low level language - correct answer ✅Source Code to get a python system to run it has to be saved in a program file.
building blocks of a code - correct answer ✅sequential execution, input output, conditional execution. where in the computer is a variable such as x is stored? X=23 EX - correct answer ✅Main Memory which statement will cause an era - correct answer ✅print('y'); parsing - correct answer ✅To examine a program and analyze the syntactic structure. function of secondary memory in a computer - correct answer ✅store information for the long term even beyond a power cycle. print('hello world') - correct answer ✅puts phrase hello world on the screen Semantics - correct answer ✅Meaning of the program Output - correct answer ✅displays the result of a program or stores them in a file. Languages like java php, and python ________ - correct answer ✅do not rely on compilers to run programs.
what is the result of 1 + 2** 3/4 * 5 - correct answer ✅ 11 three logical operators - correct answer ✅and, or, not Comparison operators - correct answer ✅>, <, ==, !=, >=, <= is, is not any known zero number is interpreted as "true" - correct answer ✅true python evaluates a logical expression like >= 2 and (x/y) > 2 how is it evaluated - correct answer ✅left to right chained conditional - correct answer ✅A condition statement where there are more than two possibilities and more than two branches need if the logical condition is false then the indented statement is executed. - correct answer ✅False when the evaluation of stops because the overall value is know it is called short cutting the evaluation. - correct answer ✅Flase the Boolean expression after the if statement is called a conditional. - correct answer ✅true
useful part of a traceback - correct answer ✅what kind of error it was what is the function in this line Biggest.value=max("hello world'") - correct answer ✅max the result of a function is called a - correct answer ✅return value a function is defined using the reserved word define - correct answer ✅false functions must be defined and called separately - correct answer ✅True arguments of the function are also called - correct answer ✅parameters the return value of a function cannot be assigned to a variable - correct answer ✅false a function that does not return a value - correct answer ✅void the types of functions in python are the ones that are built in and the ones that we make - correct answer ✅true
A break statement can stop a while loop even if the while loop condition is true - correct answer ✅True The range() function defaults to increment the sequence by 2, however it is possible to specify the increment value by adding a second parameter: range(30, 1) - correct answer ✅false the looping structures we are using include for and while loops - correct answer ✅True in most cases the inner loop will be executed one time for each iteration of the outer loop - correct answer ✅true what does the following code print out? i = 1 while True: if i % 3 == 0: break print(i) i + = 1 - correct answer ✅syntax error what does the break statement do? - correct answer ✅exits the currently executing loop What will the following Python program print out?
smallest_so_far = - for the_num in [9, 41, 12, 3, 74, 15]: if the_num < smallest_so_far: smallest_so_far = the_num print smallest_so_far - correct answer ✅- a while loop will execute as long as the condition is true - correct answer ✅true What does the following code print out? adj = ["red", "big"] fruits = ["apple", "banana"] for x in adj: for y in fruits: print(x, y) - correct answer ✅red apple red banana big apple big banana What is the iteration variable in the following Python program? friends = ["Jack", "Zero", "Sally"] for friend in friends: print ("Happy Halloween, "+friend)
to return the length of string s what command do we execute? - correct answer ✅s__len__() numbers can never be converted into strings - correct answer ✅false Suppose s is "\t\tWorld\n", what is s.strip()? - correct answer ✅World The output of the following is: ABC. DEF
print("abc. DEF".capitalize()) - correct answer ✅false The output of the following statement is: abc "a"+"bc" - correct answer ✅true The format function, when applied on a string returns : - **correct
answer** ✅str a string can contain numbers and still be a string - correct answer ✅true To retrieve the character at index 3 from string s="Hello" what command do we execute? - correct answer ✅s__getitem__(3) A string is a sequence of characters. - correct answer ✅True
What is the output when following statement is executed?
print('new' 'line') - correct answer ✅newline String is a data type in python. - correct answer ✅true What would you use to check whether string s1 contains another string s2, - correct answer ✅s1__contains__(s2) Say s="hello" what will be the return value of type( - correct answer ✅str