Skip to content
CramShare
PremiumPractice exam

WGU D278 Scripting & Programming Foundations Final Exam, Verified Q&A's

EDUC100 Education — exam and revision material · Other

Updated today

Education exam material, 32 pages. Originally published on StudyMerit.

Pages
32
Academic year
2025/2026
Language
English

What’s included

Preview 3 of 32 pages

See the first 3 pages exactly as they appear in the document.

Read page 1 as text

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS AND ANSWERS 2025 1. What is the main purpose of programming? A. To write long lines of code B. To give instructions to a computer to solve a problem C. To store data only D. To replace databases Answer: B Explanation: Programming involves writing instructions that tell the computer how to perform specific tasks. 2. In programming, what is an algorithm? A. A hardware device B. A list of random numbers C. A step-by-step set of instructions to solve a problem D. A data storage unit Answer: C Explanation: An algorithm outlines the logical steps to reach a solution before coding begins. 3. Which of the following is a valid variable name in Python? A. 1number B. number_1 C. number-1 D. number 1 Downloaded by Studymerit Dotcom (samuelkaruiki40@gmail.com) lOMoARcPSD|6879242

Read page 2 as text

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS AND ANSWERS 2025 Answer: B Explanation: Variable names cannot start with numbers or contain spaces or hyphens. 4. What is the correct symbol for single-line comments in Python? A. // B. # C. <!-- --> D. /**/ Answer: B Explanation: In Python, comments start with the # symbol. 5. What does the equal sign (=) mean in programming? A. Comparison B. Assignment C. Addition D. Equality test Answer: B Explanation: The equal sign assigns a value to a variable, not compares it. 6. Which data type would best represent a student’s name? A. Integer B. String C. Float D. Boolean Answer: B Explanation: A student’s name is textual data, represented by a string. Downloaded by Studymerit Dotcom (samuelkaruiki40@gmail.com) lOMoARcPSD|6879242

Read page 3 as text

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS AND ANSWERS 2025 7. What will the expression 3 + 4 * 2 evaluate to in Python? A. 14 B. 11 C. 10 D. 8 Answer: B Explanation: Python follows order of operations (PEMDAS), so 4 * 2 = 8, then 3 + 8 = 11. 8. Which keyword is used to create a function in Python? A. define B. func C. function D. def Answer: D Explanation: The keyword def defines a new function in Python. 9. What is the output of print(type(25.5))? A. int B. float C. string D. bool Answer: B Explanation: The number 25.5 includes a decimal, so it’s a float. 10. What does a loop allow a program to do? A. Repeat actions until a condition is met Downloaded by Studymerit Dotcom (samuelkaruiki40@gmail.com) lOMoARcPSD|6879242

29 more pages after this

You’ve read 3 of 32. Unlock once and it stays in your library — and if the rest doesn’t match what you just read, you get a refund.

$11.50

Yours permanently