
















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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Sanchez MIS 3301 Final Review 2025 EXAM UPDATED QUESTIONS AND COMPLETE REVISED ANSWERS ALREADY GRADED A+ What are the main components of a computer? - CORRECT ANSWER >>>CPU Main Memory Secondary Storage Devices Input Devices Output Devices RAM - RANDOM ACCCESS MEMORY - CORRECT ANSWER >>>Volatile Memory Refers to how much memory you have on your computer Nothing is stored when computer is shut down
Typology: Exams
1 / 24
This page cannot be seen from the preview
Don't miss anything!
Hardware - CORRECT ANSWER >>> The physical components of a computer. What are the main components of a computer? - CORRECT ANSWER >>> CPU Main Memory Secondary Storage Devices Input Devices Output Devices RAM - RANDOM ACCCESS MEMORY - CORRECT ANSWER >>> Volatile Memory Refers to how much memory you have on your computer Nothing is stored when computer is shut down Cache - CORRECT ANSWER >>> Volatile Memory High speed Most Frequently used instructions Secondary storage device - (hard-drive) - CORRECT ANSWER >>> Non-Volatile Memory Platters Read-Write Heads Less Expensive ISSUES- Fragmentation , moving parts = Heat , failure
CPU (Central Processing Unit) - CORRECT ANSWER >>> executes the instructions of a computer program. Brain of the computer Who make's CPU's? - CORRECT ANSWER >>> Intel, A&D, Apple Does the operating system go from hardrive to RAM after restarting? **- CORRECT ANSWER
** Yes What are the contents of RAM? in order - CORRECT ANSWER >>> 1. Operating systems
Extended ASCII Unicode Low-Level Languages - CORRECT ANSWER >>> machine language assembly language High-level Languages - CORRECT ANSWER >>> Allows simple creation of powerful and complex programs Python, C#, Java. (has to be translated into machine language) What are the four main data types? - CORRECT ANSWER >>> String Integers Real Numbers (float) Booleans Conversion Functions - CORRECT ANSWER >>> Str() Int() Float() print('Hello World') - CORRECT ANSWER >>> print() = function 'Hello World' = Argument
String Literal - CORRECT ANSWER >>> A string that is Hard-Coded in the program Comments - CORRECT ANSWER >>> notes of explanation within a program Variable - CORRECT ANSWER >>> a name that represents a value stored in computer memory age = 27 Literal - CORRECT ANSWER >>> Hard-Coded Value Variable Literal prod_code = '12eF00' Are variables static? - CORRECT ANSWER >>> No, you can change them and it updates automatically what does F5 do? - CORRECT ANSWER >>> Runs your code What does F3 do? - CORRECT ANSWER >>> adds a comment line What does F4 do? - CORRECT ANSWER >>> Takes away the comment character Operands - CORRECT ANSWER >>> values surrounding operator Operators - CORRECT ANSWER >>> +, - , *, /, %
How do you convert the string from an input function to integers? **- CORRECT ANSWER
** With int() and float()
** machine language assembly language High-level Languages - CORRECT ANSWER >>> Allows simple creation of powerful and complex programs Python, C#, Java. (has to be translated into machine language) What are the four main data types? - CORRECT ANSWER >>> String Integers Real Numbers (float) Booleans Conversion Functions - CORRECT ANSWER >>> Str() Int() Float() print('Hello World') - CORRECT ANSWER >>> print() = function 'Hello World' = Argument String Literal - CORRECT ANSWER >>> A string that is Hard-Coded in the program Comments - CORRECT ANSWER >>> notes of explanation within a program Variable - CORRECT ANSWER >>> a name that represents a value stored in computer memory age = 27 Literal - CORRECT ANSWER >>> Hard-Coded Value Variable Literal prod_code = '12eF00' Are variables static? - CORRECT ANSWER >>> No, you can change them and it updates automatically what does F5 do? - CORRECT ANSWER >>> Runs your code What does F3 do? - CORRECT ANSWER >>> adds a comment line What does F4 do? - CORRECT ANSWER >>> Takes away the comment character Operands - CORRECT ANSWER >>> values surrounding operator Operators - CORRECT ANSWER >>> +, - , *, /, % How do you convert the string from an input function to integers? - CORRECT ANSWER >>> With int() and float() Statistically-Typed language - CORRECT ANSWER >>> must manually declare the variable's data type the data type is known at compile time you cannot change a variables data type once it is running int a; a = 20 a = 30 a cannot equal 'Bob' Dynamically-Typed Languages - CORRECT ANSWER >>> variable's data type is automatically defined data type is know at run time. a variable's data type can be re-assigned to a different data type. type() - CORRECT ANSWER >>> returns the data type of value or variable.
id(age) print(id(age)) 2289048448112 Immutable data types - CORRECT ANSWER >>> •Once they are set, they cannot change their value •Includes int, float, str, bool garbage collection - CORRECT ANSWER >>> removal of values that are no longer referenced by variables int and int result in an - CORRECT ANSWER >>> int float and float result in a - CORRECT ANSWER >>> float int and float result in a - CORRECT ANSWER >>> float What are the two options to break long statements into multiple lines? **- CORRECT ANSWER
** Continuation Character () Parentheses () Horizontal tab - CORRECT ANSWER >>> \t print('John\tDoe\t12345) John Doe 12345 Newline - CORRECT ANSWER >>> \n ** must manually declare the variable's data type the data type is known at compile time you cannot change a variables data type once it is running int a; a = 20 a = 30 a cannot equal 'Bob' Dynamically-Typed Languages - CORRECT ANSWER >>> variable's data type is automatically defined data type is know at run time. a variable's data type can be re-assigned to a different data type. type() - CORRECT ANSWER >>> returns the data type of value or variable. - useful when testing Do objects have a unique address/ID? - CORRECT ANSWER >>> Yes id() - CORRECT ANSWER >>> returns the address of an object in memory age = 27 id(age) print(id(age)) 2289048448112 Immutable data types - CORRECT ANSWER >>> •Once they are set, they cannot change their value •Includes int, float, str, bool garbage collection - CORRECT ANSWER >>> removal of values that are no longer referenced by variables int and int result in an - CORRECT ANSWER >>> int float and float result in a - CORRECT ANSWER >>> float int and float result in a - CORRECT ANSWER >>> float What are the two options to break long statements into multiple lines? - CORRECT ANSWER >>> Continuation Character () Parentheses () Horizontal tab - CORRECT ANSWER >>> \t print('John\tDoe\t12345) John Doe 12345 Newline - CORRECT ANSWER >>> \n print('John\tDoe\n12345) John Doe
JohnDoe The operation of joining string values together Can you nest a function within a function? - CORRECT ANSWER >>> yes pay_rate = float(input('Enter pay rate: ')) 3 parts of a boolean - CORRECT ANSWER >>> value, comparison operator, value Control Structures - CORRECT ANSWER >>> logical design that controls the order in which statements are executed Diamond - CORRECT ANSWER >>> decision point in a process flow diagram Do if statements have to have a else? - CORRECT ANSWER >>> no classification = input('\nEnter class: ') if classification == 'Freshman': print('Pick a mentor') print('Register') Boolean Expression - CORRECT ANSWER >>> anything that evaluates to True/False IF else - CORRECT ANSWER >>> classification = input('\nEnter class: ') if classification == 'Freshman':
print('Get an advisor') print('Pick a mentor') else: print('Request degree audit') print('Register') #outside of the loop if-else if - CORRECT ANSWER >>> if test_score >= 500: if years_exp >= 2: print('Grant interview') else: print('Deny interview') else: if years_exp >= 7: print('Grant interview') else: print('Deny interview') How many IF's do we need when handling a range of values? - CORRECT ANSWER >>> 1 less than the number of categories From right to left use >= - CORRECT ANSWER >>> if temp >= 103: category = 'High fever' else: if temp >= 100:
AND Operator - CORRECT ANSWER >>> - all Boolean Expressions must be true if major == 'MIS' and classification == 'Senior': print('MIS Seniors - attend the job fair!') OR operator - CORRECT ANSWER >>> - at least one Boolean expression must be True! if temp > 100 or heart_rate > 100: print('ER Admit Level: 1') Do you write independent IFS on a range of values? - CORRECT ANSWER >>> No What is the problem with the use of Independent IFS? - CORRECT ANSWER >>> Performance Issues IF-ELIF-ELSE - CORRECT ANSWER >>> #Constants HIGH_FEVER_MIN = 103 FEVER_MIN = 100 LOW_FEVER_MIN = 99 NORMAL_MIN = 97 if temp >= HIGH_FEVER_MIN: msg = 'Go to the ER!' elif temp >= FEVER_MIN: msg = 'Take Tylenol' elif temp >= LOW_FEVER_MIN: msg = 'Get rest'
elif temp >= NORMAL_MIN: msg = 'All is well' else: msg = ' See your doctor' Two extremes - use OR - CORRECT ANSWER >>> if sales < 5000 or sales >= 20000: print('Notify manager!') Between two values - use AND - CORRECT ANSWER >>> if sales >= 5000 and sales < 20000: print('Normal sales valid') String Case Method - CORRECT ANSWER >>> any_str.upper() upper() - JOHN DOE lower() - john doe title() - John Doe short circuit evaluation - AND operator - CORRECT ANSWER >>> if 1st expression is false, it exits the IF structure. if major == 'MIS' and classification == 'Senior': print('Attend job fair!') short circuit evaluation - OR operator - CORRECT ANSWER >>> if 1st expression is true, it enters the IF block. if classification == 'Junior' or classification == 'Senior': print('Attend job fair!')
pre-test loop indefinite loop - CORRECT ANSWER >>> where the number of iterations is not know up front definite loop - CORRECT ANSWER >>> where the number of iterations is known (FOR loop is preferred for definite loops) iteration variable - CORRECT ANSWER >>> variable used to control the loop INITIALIZE - loop_again = 'y' TEST - while loop_again == 'y': ... ... UPDATE THE ITERATION VARIABLE loop_again = input('Do you want to loop again (y/n)? ') Sentinel Value - CORRECT ANSWER >>> is a value that marks the end of a loop; it must be different from a valid value. prod_num = int(input('\nEnter a product number (or 9999 to exit): ')) while prod_num != 9999: #add code to lookup & display product data here prod_num = int(input('\nEnter a product number (or 9999 to exit): ')) print('\nProgram ended')
Infinite Loop - CORRECT ANSWER >>> one that runs continuously cont = 'y' while cont == 'y': print('----') #DIDNT UPDATE THE VALUE! FOR loop - CORRECT ANSWER >>> Count-controlled loop iterates through a specific number of items What does we use FOR loops to iterate through? - CORRECT ANSWER >>> Lists - a list is an iterable range() RANGE syntax - CORRECT ANSWER >>> range(start, stop, step) for num in range(1,5,1): print(num) 1 2 3 4
a *= 2 a //= 2 a **= 2 Counter Variables - CORRECT ANSWER >>> - Keep track of how many times a loop has executed play_again = 'y' count = 0 while play_again == 'y': print('\nGame in progress...') #Game logic goes here COUNT += 1 play_again = input(' >> Want to play again (y/n)? ') print('\nGame was played', COUNT, 'times') Running Total - CORRECT ANSWER >>> Accumulating a value over time Logic initialize the accumulator Loop get the current value add value to the accumulator
input validation - CORRECT ANSWER >>> Verifying a user's input to an application. age = int(input('Enter age: ')) #Input validation while age < 13 or age > 16: #INCLUSIVE print(' Age must be 13 to 16 years old. Please enter a valid age.\n') age = int(input('Enter age: ')) print('\nAge is valid!') isdigit() - CORRECT ANSWER >>> tests any string to see if it contains only numeric digits : 0-9. an_str.isdigit() Loop Control Statements - CORRECT ANSWER >>> Break Continue Pass Break - CORRECT ANSWER >>> exits out o the loop immediately user_num = int(input('Enter a number from 1 to 10: 5 ')) for num in range(1,11): if num == user_num: