Hundred Acre Wood - codepath/compsci_guides GitHub Wiki

TIP102 Unit 1 Session 1 Standard (Click for link to problem statements)

Problem Highlights

  • 💡 Difficulty: Easy
  • Time to complete: 2 mins
  • 🛠️ Topics: Functions

U-nderstand

Understand what the interviewer is asking for by using test cases and questions about the problem.

  • Q: What is the function supposed to do?
    • A: The function welcome() is supposed to print the string "Welcome to The Hundred Acre Wood!".
  • Q: Are there any input parameters?
    • A: No, the function does not take any input parameters.
  • Q: What should the function return?
    • A: The function does not return anything; it simply prints a string.

P-lan

Plan the solution with appropriate visualizations and pseudocode.

General Idea: Write a function that prints a predefined string.

1) Define the function `welcome()`.
2) Inside the function, use the `print` statement to output the desired string.

**⚠️ Common Mistakes**

- Forgetting to include the exact string format specified in the problem.
- Adding extra spaces or characters in the string.

I-mplement

Implement the code to solve the algorithm.

def welcome():
    print("Welcome to The Hundred Acre Wood!")