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 3 out of 25 pages
Exam (elaborations)

WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON PRACTICE EXAM QUESTIONS WITH CORRECT DETAILED ANSWERS | ALREADY GRADED A+RECENT VERSION

Document preview thumbnail
Preview 3 out of 25 pages

WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON PRACTICE EXAM QUESTIONS WITH CORRECT DETAILED ANSWERS | ALREADY GRADED A+RECENT VERSION 1) An online platform offering data science and analytics courses - ANSWER Data Camp 2) A comprehensive course for learning Python programming - ANSWER Springboard Python course 3) A program that translates Python code into machine code - ANSWER Python compiler 4) Extracting a portion of a sequence like a string or list in Python - ANSWER Slicing 5) A notable resource for learning programming through tutorials and guides - ANSWER Corey Schaefer 6) A collection of programming tutorials and resources - ANSWER Bro Code Playlist 7) Converting a value to a different data type, e.g., int('1') returns 1 as an integer - ANSWER Type conversion/casting 8) Enforcing order of operations using parentheses, e.g., 3 * (2+1) = 9 - ANSWER Precedence 9) Using type() to find the data type of a variable or value - ANSWER Data type check 10) An ordered and changeable collection in Python allowing duplicates - ANSWER List 11) An unordered and immutable collection in Python, allowing addition/removal but no duplicates - ANSWER Set 12) An ordered and unchangeable collection in Python, allowing duplicates and faster operations - ANSWER Tuple 13) Unable to be changed, e.g., tuple elements - ANSWER Immutable 14) Dividing integers to get the whole number part of the quotient - ANSWER Floor division 15) Estimates average calories burned based on age, weight, heart rate, and time - ANSWER Calories burned equation 16) Using math library for operations like power, absolute value, and square root - ANSWER Math functions 17) Calculating frequencies of keys on a piano based on initial key frequency - ANSWER Frequency calculation 18) Time taken for a substance to reduce to half its original value - ANSWER Half-life 19) Outputting price change and estimated monthly mortgage based on current and last month's price - ANSWER House real estate summary 20) Calculating product and average of floating-point numbers, rounding and formatting the output - ANSWER Simple statistics 21) Determining the season based on input date and month, considering days in each month - ANSWER Northern hemisphere seasons 22) Spring: March 20 - June 20, Summer: June 21 - September 21, Autumn: September 22 - December 20, Winter: December 21 - March 19 - ANSWER Seasons 23) A year with 366 days, occurring every 4 years and divisible by 4, except for century years not divisible by 400 - ANSWER Leap Year 24) 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 25) 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 26) Used for multiple choices. 'if' for an option, 'elif' for alternatives, 'else' as the final option if none apply - ANSWER Conditional Statements 27) Used to iterate a specific number of times or through elements in a list - ANSWER For Loop 28) Used to iterate until a condition is met, breaking based on a condition rather than a specific number of iterations - ANSWER While Loop 29) Loops within loops, used for complex iterations and operations - ANSWER Nested Loops 30) Lists within lists, used for organizing and managing complex data structures - ANSWER Nested Lists 31) Returns a sequence of numbers, commonly used in for loops - ANSWER Range Function 32) Iterating through a list to find the smallest and largest values - ANSWER Smallest and Largest Numbers in a List 33) Method to add elements to the end of a list - ANSWER Append 34) Used to exit a loop based on a certain condition, instead of relying on the condition to become false - ANSWER Break Statement 35) Representing an integer in reverse binary by outputting remainders of division by 2 - ANSWER Reverse Binary 36) Used to separate the main code from the function's code for unit testing - ANSWER __name__ == '__main__' 37) Function taking miles per gallon, price per gallon, and miles driven to return the dollar cost - ANSWER Driving Cost Function 38) Function returning 'Heads' or 'Tails' based on a random value of 1 or 0 - ANSWER Coin Flip Function 39) Testing small parts of a program in an isolated manner to ensure they work as expected - ANSWER Unit Tests 40) Evaluates individual functions for correctness and proper naming, parameters, and return type - ANSWER Unit test 41) Separates main code from functions' code for unit testing when running as a script - ANSWER if __name__ == '__main__': 42) Function that converts weight in kilograms to pounds - ANSWER kilo_ to_ pounds() 43) Function that swaps the positions of four integers - ANSWER swap_ values 44) Function that checks if a string represents an integer - ANSWER check_ integer_ string 45) Activity where user provides words to complete a story in unexpected ways - ANSWER Mad Libs 46) Built-in function to keep track of the number of iterations in a loop - ANSWER enumerate 47) Repeats an action for everything in a container - ANSWER for loop 48) Repeats an action based on a condition - ANSWER while loop 49) Generates a sequence of numbers within a specified range - ANSWER range() function 50) Allows for easy formatting of strings in Python - ANSWER F strings 51) Data structure with key-value pairs, where keys must be unique - ANSWER dictionary 52) A program consists of? - ANSWER input, process, output 53) A named item used to hold a value? - ANSWER variable 54) Sequence of instructions that solves a problem. - ANSWER Algorithm 55) program that executes python programming. - ANSWER python or IDE 56) textual representation of a program - ANSWER code 57) row of text - ANSWER line

Content preview

WGU D335 INTRODUCTION TO
PROGRAMMING IN PYTHON
PRACTICE EXAM QUESTIONS
WITH CORRECT DETAILED
ANSWERS | ALREADY GRADED
A+<RECENT VERSION>


1) An online platform offering data science and analytics courses - ANSWER Data
Camp


2) A comprehensive course for learning Python programming - ANSWER
Springboard Python course


3) A program that translates Python code into machine code - ANSWER Python
compiler


4) Extracting a portion of a sequence like a string or list in Python - ANSWER
Slicing


5) A notable resource for learning programming through tutorials and guides -
ANSWER Corey Schaefer



6) A collection of programming tutorials and resources - ANSWER Bro Code
Playlist

,7) Converting a value to a different data type, e.g., int('1') returns 1 as an integer -
ANSWER Type conversion/casting



8) Enforcing order of operations using parentheses, e.g., 3 * (2+1) = 9 - ANSWER
Precedence


9) Using type() to find the data type of a variable or value - ANSWER Data type
check


10) An ordered and changeable collection in Python allowing duplicates - ANSWER
List


11) An unordered and immutable collection in Python, allowing addition/removal but no
duplicates - ANSWER Set


12) An ordered and unchangeable collection in Python, allowing duplicates and faster
operations - ANSWER Tuple



13) Unable to be changed, e.g., tuple elements - ANSWER Immutable



14) Dividing integers to get the whole number part of the quotient - ANSWER Floor
division


15) Estimates average calories burned based on age, weight, heart rate, and time -
ANSWER Calories burned equation


16) Using math library for operations like power, absolute value, and square root -
ANSWER Math functions


17) Calculating frequencies of keys on a piano based on initial key frequency -
ANSWER Frequency calculation



18) Time taken for a substance to reduce to half its original value - ANSWER Half-life

, 19) Outputting price change and estimated monthly mortgage based on current and last
month's price - ANSWER House real estate summary


20) Calculating product and average of floating-point numbers, rounding and formatting
the output - ANSWER Simple statistics


21) Determining the season based on input date and month, considering days in each
month - ANSWER Northern hemisphere seasons


22) Spring: March 20 - June 20, Summer: June 21 - September 21, Autumn: September 22
- December 20, Winter: December 21 - March 19 - ANSWER Seasons


23) A year with 366 days, occurring every 4 years and divisible by 4, except for century
years not divisible by 400 - ANSWER Leap Year


24) 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


25) 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


26) Used for multiple choices. 'if' for an option, 'elif' for alternatives, 'else' as the final
option if none apply - ANSWER Conditional Statements



27) Used to iterate a specific number of times or through elements in a list - ANSWER
For Loop


28) Used to iterate until a condition is met, breaking based on a condition rather than a
specific number of iterations - ANSWER While Loop

Document information

Uploaded on
March 16, 2026
Number of pages
25
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$15.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.
jervismuthami
4.5
(2)
Sold
12
Followers
0
Items
569
Last sold
1 month 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