
















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
WGU D522 SCRIPT 2026 FULL SOLVED CONTENT
Typology: Exams
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















◉Python is. Answer: readable dynamically typed extensive standard library cross plat versatile interpreted nature ◉Programming Paradigm. Answer: a fundamental style or approach to programming that dictates how tasks should be structured and executed in each programming language. It encompasses principles, concepts, and patterns that guide the design and organization of code. ◉imperative/procedural programming. Answer: focuses on describing a sequence of steps to perform a task, procedures or routines. ◉object-oriented programming (OOP). Answer: organizes code around objects, which encapsulate data and behavior
◉functional programming. Answer: emphasizes the use of functions and immutable data for computation ◉declarative programming. Answer: describes what the program should accomplish without specifying how to achieve it ◉event-driven programming. Answer: reacts to events and user actions, triggering corresponding functions ◉logic programming. Answer: defines a set of logical conditions and lets the system deduce solutions ◉indentation. Answer: defines blocks of code. crucial for structure and nesting of code blocks (4 spaces) ◉comments. Answer: # ignored by interpreter, for humans ◉Variable. Answer: used to store data, created by assigning a value to a name
◉Integrated Development Environments (IDEs). Answer: provide a more user-friendly environment for coding, debugging, and running Python scripts ◉Markdown file. Answer: simple format used frequently to add styled text, images, code snippets and more to coding repos serving as documentation human readable ◉.md. Answer: markdown file ◉Consistent Indentation. Answer: All statements within the same block must be indented by the same number of spaces. ◉input(). Answer: function, storing user entered info as strings ◉output(). Answer: functions, allowing the presentation of results or messages ◉format(). Answer: method, enhances output formatting by embedding variables in strings
◉file I/O. Answer: through the open() functions enabling reading from and writing to external files. ◉len (). Answer: determines the length of a sequence ◉type (). Answer: returns the type of an object ◉int (), float (), str (). Answer: converts values to integers, floats, or strings ◉max (), min(). Answer: returns the max or min value from a sequences ◉sum (). Answer: finds the sum of elements in a sequence ◉abs (). Answer: returns the absolute value of a number ◉range (). Answer: generates a sequence of numbers ◉sorted (). Answer: returns a sorted list from an iterable ◉any (), all(). Answer: checks if any or all elemebts in an interable are true
◉integrated documentation. Answer: provides access to documentation for Python libraries and modules directly within the IDE ◉code profiling. Answer: Allows developers to analyze code performance and identify areas for optimization ◉Problem solving process. Answer: analyze problem develop algo write code test and debug ◉python is dynamically typed. Answer: variable types in python are determined at runtime ◉Purpose of code editor in python IDE. Answer: provide a text editor offering syntax highlighting, code completion, and indentation. ◉Python variables. Answer: serving as placeholders to store and manage data. In Python, you don't need to explicitly declare a
variable's data type; it dynamically infers it based on the assigned value. ◉Symbolic Names. Answer: refer to names or identifiers that represent values, objects, or entities. ◉variable name rules. Answer: number, letters, _ start with letter or _ cannot be a python keyword ◉assign multiple variables. Answer: x, y, z = "one", "two", "three" ◉assigning the same value multiple variables. Answer: hi = hello = hey = "greeting" ◉printing multiple variables with , and +. Answer: + will combine strings, and also numbers but not together , will combine strings and numbers together. ◉inside a function. Answer: means the code is part of a specific function block. Variables defined inside the function have local scope, and the function executes when called.
◉boolean. Answer: true or falseu is_true=true is_false=false ◉list. Answer: ordered, mutalble sequence [ ] ◉tuple. Answer: ordered, immutable sequence ( ) ◉set:. Answer: unordered, mutable collection of unique elements ◉frozenset:. Answer: unchangeable set ◉dict:. Answer: dictionary, an unordered collection of key-pair values
◉int_num = int(float_num). Answer: converting something to integer, int same for x = float(y) x = round(y) x=abs(y) - absoluite value ◉You can create multiple strings with. Answer: three quotes ◉Repitition (*). Answer: repeat a string ◉concatenation (+). Answer: combine two strings ◉Indexing ([]). Answer: accessing individual characters by position. First pos is 0. ◉(f-strings). Answer: stands for format. Replaces the name of any variable in braces with its value. ◉\n \t. Answer: new line new tab
◉count (). Answer: counts the occurrences of a substring in the given string ◉strip (). Answer: removes leading and trailing whitespaces ◉lstrip (). Answer: removes leading white spaces ◉rstrip (). Answer: removes trailing whitepsaces ◉+=. Answer: shorthand for concatenation and assignment ◉greeting = "Hello " greeting =+ "Python!" print (greeting). Answer: Hello Python ◉join (). Answer: combine strings from an iterable (list) ◉positional arguments. Answer: arguments that are passed to a function or method in a specific order.
◉named arguments. Answer: keyword arguments, passed to a function or method by explicitly stating the name of the parameter and its value. ◉assignment operators. Answer: =, +=, - =, *=, /=, %=, //=, **= ◉membership operators. Answer: in, not in ◉identity operators. Answer: is, is not ◉modulus %. Answer: returns the remainder ◉floor division //. Answer: performs division and rounds down to the nearest whole number. ◉bitwise shift << >>. Answer: lower than arthimetic operations ◉Exponentiation **. Answer: next highest ◉bitwise AND &. Answer: lower than shifts ◉bitwise XOR ^. Answer: lower than AND
◉negative indexing. Answer: allows you to access elemends from the end of a sequence such as a list. - 1 is last - 2 is second to last. ◉insert (). Answer: add an item at a specific postion in a list. ◉append (). Answer: used to add an item to the end of a list. ◉extend (). Answer: used to add multile items to the end of a list. ◉remove (). Answer: remove the first occurence of a specified item from a list. ◉pop (). Answer: used to remove an item at a specified postion in a list and return in ◉del. Answer: delete objects. ◉clear (). Answer: used to remove all items from a list ◉reverse (). Answer: method used to reverse the order of items in a list.
◉copy (). Answer: creates a new list by copying the original list ◉you can combine lists together with. Answer: + operator also by using extend () ◉updating a tuple. Answer: involved converting it to a list, updating the list, then converting it back to a tuple. ◉list are tuples are. Answer: mutable immutable ◉key value mappion. Answer: dictionairies allow you to associate values with descriptive keys, providing a convenient way to represent relationships between data. ◉Fast Retrieval. Answer: dictionaires have fast and effiecient retrieval ◉dictionaires. Answer: deal when you need to organize data in a way that facilitates efficient and expressive access
or set() ◉add (). Answer: add items to a python set ◉remove () discard(). Answer: remove an item from a set ◉sets do not. Answer: allow duplicate values are unindexed ◉first for task scheduling. Answer: pip install schedule ◉first for cloud automation. Answer: pip install boto ◉definition. Answer: function is a named block of reusable code ◉syntax. Answer: defined with def, a name, parameters, and an indented code black ◉Parameters. Answer: input values passed to the function ◉Execution. Answer: performs specific tasks within the code block
◉Return. Answer: optionally provides a result ◉Benefits. Answer: enhances code modularity, readability, and reusability ◉create a function. Answer: def function_name (): ◉call a function. Answer: function_name basically call it without the def ◉Arguments. Answer: values that are passed to a function when it is called. treated as a variable inside the function. ◉Parameters. Answer: variables in a functions definition ◉arbitrary arguments. Answer: allow a function to accept any number of arguments. ◉keyword arguments. Answer: arguments that are identified by the parameter name in a function call.