Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for s2q2_swaramulagari
def main(): print("Welcome to the Custom Greeting Generator!") greetings = ["Welcome", "Hi", "Hello", "Hey"] print("Choose a greeting:") for index, greeting in enumerate(greetings, start=1): print(f"{index}. {greeting}") while True: choice = int(input("Enter the number corresponding to your chosen greeting: ")) if 1 <= choice <= len(greetings): chosen_greeting = greetings[choice - 1] break else: print("Invalid choice. Please enter a number within the given range.")
name = input("Please enter your name: ")
greeting = f"{chosen_greeting}, {name}!" print(greeting)
if name == "main": main()
Log in or sign up for Devpost to join the conversation.