Write a function greeting that consumes a string of length at least three and produces "Hello"
if the first three characters are "Hi!" and produces "Bye" otherwise.
def greeting(msg):
if msg=="Hi!":
print("Hello")
else:
print("Bye")
greeting(input("Enter message: "))
Comments
Leave a comment