WGU C949 DATA STRUCTURES & ALGORITHMS CHAPTERS 1-4 EXAM 2024
WGU C949 DATA STRUCTURES & ALGORITHMS CHAPTERS 1-4 EXAM 2024 In Python, there are three (3) different types of commenting styles. What are they? - correct answer In-line, Multiline, Documentation Strings (Docstrings) "Comments used to add meaning to a program and explain logic in-line with the code being discussed. These comments are good for quick explanations and are indicated by using the # character and a space. if n % 2 == 1: # n is odd" - correct answer In-line "Comments, also known as block comments, are good for more in-depth explanations or when you want to comment a complex section of code. In Python we append together a section of lines all beginning with the # character to achieve this. # This section of code # Requires a longer comment # So we can add as many lines as needed" - correct answer Multiline "These are used like the comments referenced above but it allows you much more space to write a longer message and they can be written out at runtime, which means the interpreter does see them, unlike
Written for
- Institution
-
Western Governers University
- Course
-
Wgu
Document information
- Uploaded on
- May 31, 2024
- Number of pages
- 26
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
wgu c949 data structures algorithms chapters 1 4