Docsity

WGU C859 PYTHON TEST 78 QUESTIONS AND SOLUTIONS, Exams of Programming Paradigms

Toggle sidebar
bg1
WGU C859 PYTHON TEST 78 QUESTIONS
AND SOLUTIONS
โ—‰ Input-Process-Output thinking standard to determine coding
structure.
Answer: IPO thinking standard
โ—‰ A special variable in Python that holds the name of the current
module.
Answer: __name__
โ—‰ A special variable in Python that indicates the main module.
Answer: __main__
โ—‰ A resource for learning Python programming.
Answer: Python Crash Course Book ๐Ÿ
โ—‰ Application Programming Interfaces accessible to the public.
Answer: Public API's
โ—‰ Time management method using a timer to break work into
intervals.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download WGU C859 PYTHON TEST 78 QUESTIONS AND SOLUTIONS and more Exams Programming Paradigms in PDF only on Docsity!

WGU C859 PYTHON TEST 78 QUESTIONS

AND SOLUTIONS

โ—‰ Input-Process-Output thinking standard to determine coding structure. Answer: IPO thinking standard โ—‰ A special variable in Python that holds the name of the current module. Answer: name โ—‰ A special variable in Python that indicates the main module. Answer: main โ—‰ A resource for learning Python programming. Answer: Python Crash Course Book ๐Ÿ โ—‰ Application Programming Interfaces accessible to the public. Answer: Public API's โ—‰ Time management method using a timer to break work into intervals.

Answer: Pomodoro Technique โ—‰ Data structure with key-value pairs used for mapping inputs to outputs. Answer: Dictionaries โ—‰ An introductory course to computer science offered by Harvard University. Answer: CS โ—‰ An efficient, comparison-based sorting algorithm. Answer: Merge Sort โ—‰ Ordered collection of items in Python denoted by square brackets. Answer: Lists โ—‰ Immutable ordered collection of items in Python denoted by parentheses. Answer: Tuples โ—‰ Symbols used to represent values and perform operations. Answer: Variables and Expressions

โ—‰ Function to round a value to a specified number of digits after the decimal point. Answer: Round function โ—‰ Statements used for repeated execution of instructions in a program. Answer: Iteration Statements โ—‰ An educational coding platform for honing programming skills. Answer: Codewars โ—‰ An online platform offering data science and analytics courses. Answer: Data Camp โ—‰ A comprehensive course for learning Python programming. Answer: Springboard Python course โ—‰ A program that translates Python code into machine code. Answer: Python compiler โ—‰ Extracting a portion of a sequence like a string or list in Python. Answer: Slicing

โ—‰ A notable resource for learning programming through tutorials and guides. Answer: Corey Schaefer โ—‰ A collection of programming tutorials and resources. Answer: Bro Code Playlist โ—‰ Converting a value to a different data type, e.g., int('1') returns 1 as an integer. Answer: Type conversion/casting โ—‰ Enforcing order of operations using parentheses, e.g., 3 * (2+1) =

Answer: Precedence โ—‰ Using type() to find the data type of a variable or value. Answer: Data type check โ—‰ An ordered and changeable collection in Python allowing duplicates. Answer: List

โ—‰ Calculating frequencies of keys on a piano based on initial key frequency. Answer: Frequency calculation โ—‰ Time taken for a substance to reduce to half its original value. Answer: Half-life โ—‰ Outputting price change and estimated monthly mortgage based on current and last month's price. Answer: House real estate summary โ—‰ Calculating product and average of floating-point numbers, rounding and formatting the output. Answer: Simple statistics โ—‰ Determining the season based on input date and month, considering days in each month. Answer: Northern hemisphere seasons โ—‰ Spring: March 20 - June 20, Summer: June 21 - September 21, Autumn: September 22 - December 20, Winter: December 21 - March 19. Answer: Seasons

โ—‰ A year with 366 days, occurring every 4 years and divisible by 4, except for century years not divisible by 400. Answer: Leap Year โ—‰ Primary highways: 1-99, odd for north/south, even for east/west. Auxiliary: 100-999, servicing the rightmost two digits of the primary highway. Answer: Interstate Highway Numbers โ—‰ Score names: 'Eagle' (2 less than par), 'Birdie' (1 less), 'Par' (equals par), 'Bogey' (1 more); 'Error' if par not 3, 4, or 5. Answer: Golf Scores โ—‰ Used for multiple choices. 'if' for an option, 'elif' for alternatives, 'else' as the final option if none apply. Answer: Conditional Statements โ—‰ Used to iterate a specific number of times or through elements in a list. Answer: For Loop โ—‰ Used to iterate until a condition is met, breaking based on a condition rather than a specific number of iterations.

โ—‰ Representing an integer in reverse binary by outputting remainders of division by 2. Answer: Reverse Binary โ—‰ Used to separate the main code from the function's code for unit testing. Answer: name == 'main' โ—‰ Function taking miles per gallon, price per gallon, and miles driven to return the dollar cost. Answer: Driving Cost Function โ—‰ Function returning 'Heads' or 'Tails' based on a random value of 1 or 0. Answer: Coin Flip Function โ—‰ Testing small parts of a program in an isolated manner to ensure they work as expected. Answer: Unit Tests โ—‰ Evaluates individual functions for correctness and proper naming, parameters, and return type. Answer: Unit test

โ—‰ Separates main code from functions' code for unit testing when running as a script. Answer: if name == 'main': โ—‰ Function that converts weight in kilograms to pounds. Answer: kilo_to_pounds() โ—‰ Function that swaps the positions of four integers. Answer: swap_values โ—‰ Function that checks if a string represents an integer. Answer: check_integer_string โ—‰ Activity where user provides words to complete a story in unexpected ways. Answer: Mad Libs โ—‰ Built-in function to keep track of the number of iterations in a loop. Answer: enumerate