The keyword defining the function is :
D.def
if name == ‘main’: When do the statements in the following statement block execute ?
B. When the program file job script is executed directly, it will be executed
Xiao Ming is a car fan , When you see a car, you can immediately tell the production year of the car 、 Model and brand . Define a function , Can output the introduction of the car .
for example
Input :2020 AMG_S65 Mercedes
Output : This is a car 2020 Annual production , Model is AMG_S65 Mercedes Benz
The function is required to have the following functions : When the user only enters the production year 、 Model time , Brand press “ BMW ” Output .
Enter the years separated by spaces 、 Model and brand ( The brand may not )
Output :
This is a car Annual production , Model is