请改正下面程序中存在的错误。 def StudentInfo(country='China', chineselevel='A', name): print('%s,%s,%s'%(name,country,chineselevel)) StudentInfo(country='America', chineselevel='B', name='John')

请改正下面程序中存在的错误。 def StudentInfo(country='China', chineselevel='A', name): print('%s,%s,%s'%(name,country,chineselevel)) StudentInfo(country='America', chineselevel='B', name='John')


参考答案和解析
'B'

相关考题:

从下面方框中选择适当的词填入短文中,使短文通顺正确(注意有些词要用适当的形式)。方框中有两个多余的词。 elephantrainblack grow snow bebecomeThis country is far away from China, Like China, it is also a developing country. It has a population of about 45 million. Of these, 76 percent are (76)____________ and 12 percent white. It has a warm climate (气候). Either it never rains, or it (77) __________ a lot!. It is the world’s biggest producer of gold, and it sells diamonds(钻石) to other countries. It (78) ____________ a lot of fruits, including oranges, pears, and grapes, and it makes wine.There (79)_________ lots of large forests where you can see a lot of wildlife(野生动物), including lions, (80) ___________, zebras, and giraffes. Many people like to go and travel in this country. Can you guess the name of this country.

When ________, John did not reply. (A) he asking what his name was(B) was asked what his name was(C) asking what John’s name was(D) asked what his name was

DAnne and Joseph are talking about an interesting question. Why do some people change their names? There can be many reasons. Hanna changed her name to Anne because she thought it would be easier for people to remember. On the other hand, Joseph is thinking about changing his name to an unusual name because he wants to be different.People have a lot of reasons for changing their names. Film stars, singers, sportsmen and some other famous people often change their names because they want names that are not ordinary, or that have special sound. They chose the “new name” for themselves instead of the name their parents gave them when they were born.Some people have another reason for changing their names. They have moved to a new country and want to use a name that is usual there. For example, Li Kaiming changed his name to Ken Lee when he moved to the United States. He uses the name Ken at his job and at school. But with his family and Chinese friends, he uses Li Kaiming. For some people, using different names makes life easier in their new country.In many countries, a woman changes her family name to her husband’s after she gets married. But today, many women are keeping their own family name and not using their husband’s. Sometimes , women use their own name in some situations (情况)and their husband’s in other situations . And some use both their own name and their husband’s.根据短文内容,完成下面表格。different peoplereason to change the nameHannaIt is ____61____ for people to remember.JosephHe wants to have a name that’s ____62_____.famous peopleTheir name may sound _____63_____.Li KaimingUsing different names can make ____64_____ easier.a womanAfter she gets _____65_____, she may change her name.61._________________________________________________________________________

根据下列定义,能打印出字母P的语句是( )。struct stu{char name[10];int age;};struct stu s[10]={"John",11,"Pau1",12,"Mary",11,"adam",12};A.primf("%c",s[3].name};B.primf("%c",s[3].name[1]);C.printf("%c",s[2].name[1]);D.printf("%c",s[1].name[0]);

根据下列的定义,能打印出字母P的语句是( )struct stu {char name[10];int age;};stmct stu s[10]={"John",11,"Paul",12,"Mary",11,"adam",12}:A.printf("%c",s[3].name);B.printf("%c",s[3].name[1]);C.printf("%c",s[2].name[11]);D.printf("%c",s[1].name[0]);

● 语句(43)用于在HTML表单中添加默认选中的复选框。(43)A. input type=radio name=s checkedB. input type=radio name=s enabledC. input type=checkbox name=s checkedD. input type=checkbox name=s enabled

设有如下的用户定义类型: Type Student number As String name As string age As Integer End Type 则以下正确引用该类型成员的代码是______。A. Student name="李明”B.Dim s As Student s.name="李明"C.Dim s As Type Student s.name="李明"D.Dim s As Type s.name="李明"

清使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl,此工程中包含了类Pets(“宠物”) 和主函数main的定义。程序中位于每个“//ERROR****found ****”之后的一行语句有错误,请加以改 正。改正后程序的输出结果应为: Name:sonny Type:dog Name:John Type:dog Name:Danny Typc:cat Name:John Type:dog 注意:只修改每个“//ERROR ****found ****”下的那一行,不要改动程序中的其他内容。 includeiostream using namespace sm; enum Pets_type{d09,cat,bird,fish}; class Pets{ private: char *name; Pets_type type; public: Pets(const char *name=”sonny”,Pets_type type=dog); Petsoperator=(const Petss); ~Pets; void showeonst;}; Pets::Pets(eonst char$naIne,Pets_type type) //构造函数 { This -name=new char[strlen(name)+1]; strcpy(this一name,name); //ERROR *********found********* type=type; }{ Pets::~Pets//析构函数,释放name所指向的字符串 { //ERROR *********found********* name=’/0‘; } PetsPets::0perator=(const Petss){ if(s==this)//确保不要向自身赋值 return *this; delete[]name; name=new char[strlen(S.name)+1];//ERROR *********found********* strcpy(this一nmne,name); type=S.type: return *this;} void Pets::showconst cout“Name:”name”Type:”: Pets mypetl,mypet2(’’John”,dog);

听力原文:Banks are crucial to a country's economy, they serve as the center point of the exchange of money throughout the economy.(10)A.Cash is crucial to a country's economy.B.Money is crucial to a country's economy.C.Capital is crucial to a country's economy.D.Banks are crucial to a country's economy.

有以下程序includestruct STU{char name[10];int num;};void f(char*name, intnum){s 有以下程序 #include <string.h> struct STU { char name[10]; int num; }; void f(char *name, int num) { struct STU s[2]={{"SunDan",20044},{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() { struct STU s[2]={{"YangSan",20041},{"LiSiGuo",20042}},*p; p=s[1]; f(p->name,p->num); printf("%s %d\n",p->name,p->num); } 程序运行后的输出结果是A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

下面哪些句子可以表示"您贵姓?"() A、What's your last name?B、What's your family name?C、What's your name?D、What's your first name?

有以下程序: include struct STU (char name[10]; int num; }; 有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p;p=s[1]; f(p->name,p->num); printf("%s%d\n",p->name,p->num); } 程序运行后的输出结果是 ______。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“//ERROR****found料****之后的一行语句有错误,请加以改正。改正后程序的输出结果应为: Name:Smith Age:21 ID:99999 CourseNum:12 Record:970 注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。 includeiostream using namespace std; class Studentlnfo { protected: //ERROR********************found**************** char Name; int Age; int ID: int CourseNum; float Record; public: Studentlnfo(char*name,int Age,int ID,int coumeNum,float record); //ERROR ********************found******************** void~Studentlnfo{} float AverageRecord{ return Record/CourseNum; } void showconst{ cout”Name:”Name”Age:”Age”ID:”ID ”CourseNum:”CourseNum”Record:”Recordendl; } }; //ERROR ******************found************** StudentInfo StudentInfo(char*Name,int Age,int ID,int CourseNum,float Record) { Name=name; Age=age; this一ID=ID: CourseNum=courseNum: Record=record; } int main { Studentlnfo st(’’Smith”,21,99999,12,970); st.show; return 0; }

有以下程序:includeinclude struct STU {char name[10];int hum;};void f( 有以下程序:#include <stdio.h>#include <strine.h> struct STU { char name[10]; int hum;};void f(char * name,iht num){ struct STU s[2] = {{ "SunDan" ,20044} , {" Penghua" ,20045}}; num= s[0]. nnm; strepy(name,s[0], name);}main( ){ struct STU s[2] = {{"YangSan" ,20041 }, { "LiSiGao" ,20042}}, * P; p = s[1]; f(p->name,p->hum); printf("% s %d \n" ,p-> name,p->num);}程序运行后的输出结果是( )。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

根据下列的定义,能打印出字母P的语句是( )。 struct stu {char name[10]; int age; }; struct sm s[10]={"John",11, "Pau1",12, "Mary",11, "adam",12 };A.printf("%c",s[3].name);B.printf("%c",s[3].name[1]);C.printf("%c",s[2].name[1]);D.printf("%c",s[1].name[0]);

For the new country to survive,( )for its people to enjoy prosperity,new economic policies will be required.A.to name a fewB.let aloneC.not to speakD.let’s say

下面的XML片断中结构完整的是()。A、<customer name=”<xml>.con”><address>123 MainStreet></address></customer>B、<customer><name>Joe’s XML Works</name><address>New York</costomer>C、< customer type=extemal><name>Partners Unlimited</name></customer>D、<customer name=”John Doe”><address>123 Main Street</address> <zip code=”01837”/></customer>

You executed the following code:   SQL CERATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   Which types of tables will be created automatically?()A、 journal tableB、 clustered tableC、 mapping tableD、 partitioned table

单选题Which country and its city have the same name?ABurma.BSingapore.CIndia.

单选题You executed the following code:   SQL CERATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   Which types of tables will be created automatically?()A journal tableB clustered tableC mapping tableD partitioned table

单选题有以下程序:#includemain(){ charname[10]={'S','T','R'}; name[2]='#'; name[6]=0; printf(%s,name);}程序运行后的输出结果是(  )。AST#BSTR#CSTR#0DSTR0

单选题有如下程序:#include main(){ char name[10] = {'S','T','R','I','N','G'}; name[3]='E'; name[5]=0; printf(%s,name);}程序运行后的输出结果是(  )。ASTRENGBSTRIEGCSTRENDSTREN0

单选题有以下程序:#include #include struct S{ char name[10];};main(){ struct S s1,s2; strcpy(s1.name,12345); strcpy(s2.name,ABC); s1=s2; printf(%s,s1.name);}程序运行后的输出结果是(  )。AABC12BABC45C12345DABC

单选题Going to the moon is an example of .AAmerica’s dreams and creativityBAmerica’s childish and queer behaviorCwhy America hasn’t grown upDwhy America is considered as the greatest country in the world

单选题You executed the following code:   SQL CREATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   In which tablespace will the mapping table be created?()A SYSTEM tablespaceB SYSAUX tablespaceC Undo tablespaceD The tablespace of the Index Organized Table (IOT)

单选题有以下程序:#include #include struct S{ char name[10];};main(){ struct S s1,s2; strcpy(s1.name,XXX); strcpy(s2.name,=); s1=s2; printf(%s,s1.name);}程序运行后的输出结果是(  )。A=BXXXC=XXDX=

单选题For the new country to survive,()for its people to enjoy prosperity, new economic policies will be requiredAto name a fewBlet aloneCnot to speakDlet's say

单选题有如下程序:structperson{ charname[10]; charsex; floatweight;}zhangsan,*ptr;ptr=zhangsan;若要从键盘读入姓名给结构体变量zhangsan的name成员,输入项错误的是(  )。Ascanf(%s,zhangsan-name);Bscanf(%s,zhangsan.name);Cscanf(%s,ptr-name);Dscanf(%s,(*ptr).name);