On this page
Hello User!
TIP101 Unit 1 Session 1 (Click for link to problem statements)
U-nderstand
Understand what the interviewer is asking for by using test cases and questions about the problem.
- What is the input?
- A string
name.
- A string
- What should the function do?
- Print a greeting made of
"Hello "followed by the name. It does not return anything.
- Print a greeting made of
HAPPY CASE
Input: name = "Ada"
Output: Hello Ada
P-lan
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Write a function that takes a name as input and prints a greeting.
I-mplement
def greet_user(name):
print("Hello " + name)