Question: This is using very basic Python coding in the Spyder app. This is chapter 1-2 so I just need very basic answers please First, we

 This is using very basic Python coding in the Spyder app.

This is using very basic Python coding in the Spyder app. This is chapter 1-2 so I just need very basic answers please

First, we define the function. Remember, you have to run the lines of code in Spyder to define the function. You only have to run the code if it hasn't been run since you (re)started your kernel, or you changed the code in the cell. import random def make_message(first, last): if first in ("GIVEN", ""] or last in ["SURNAME", ""): raise ValueError("Unchanged or empty first or last name") greeting = f"Hi, {first} {last}, it's nice to meet you!" greeting = greeting + F" I'm Robot #{random.randint(0,1000000)}" return greeting Save the result of make_message(first_name, last_name) to the variable greeting. Print greeting Use make_message(first, last) to write a greeting to one of the professors. Assign this message to the variable prof_greeting

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 Databases Questions!