Question: Write a function named greet _ and _ assign that takes two arguments: name and department. Provide the default value for department as Computer Science.

Write a function named greet_and_assign that takes two arguments: name and department.
Provide the default value for department as "Computer Science". The function should print "Hi
[name], Your assigned Department is [department]" with the provided or default values. Call
this function in your code as follows:
#write code to get the name from the user
greet_and_assign(name)
#write code to get the name and the department from the user
greet_and_assign(name, department)

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!