Question: def greet ( iqra ) : This function personalizes a greeting message with the provided name. Args: name: The name to be

def greet(iqra):
"""
This function personalizes a greeting message with the provided name.
Args:
name: The name to be used in the greeting message.
Returns:
A string containing the personalized greeting message.
"""
return f"Hello World, from {iqra}!"
# Assignment1 with function call
while True:
print("1. Print Hello World")
print("2. Calculate Square")
print("3. Check Triangle or Square")
print("4. Exit")
choice = input("Enter your choice (1/2/3/4): ")
if choice =='1':
name = input("Please enter your name: ")
print(greet(name)) # Function call to personalize greeting
print("I am very excited to learn coding!")
# ... other functionality from Assignments 1 & 2(same as before)
if choice =='4':
print("Exiting program. Goodbye!")
break
else:
print("Invalid choice. Please enter a valid option (1/2/3/4).") Add a container (list, set, dictionary, or tuple) to your Python program. Your code should update the elements in the container and print the values using a loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!