字典类型变量 d = {'name':'张三','age':22,'gender':'F'} 则 len(d)的值为A.0B.3C.6D.-1
字典类型变量 d = {'name':'张三','age':22,'gender':'F'} 则 len(d)的值为
A.0
B.3
C.6
D.-1
参考答案和解析
['age', 'gender', 'name']
相关考题:
假设有如下的记录类型: Type Student number As String name AS String age As Integer End Type 则正确引用该记录类型变量的代码是______。A.Student. name="" s. name="张红"B.Dim s As Student s. Dame="张红"C.Dim s As Type Student s. name="张红"D.Dim s As Type s. name="张红"
设当前表文件中含有字段NAME,系统中有一内存变量的名称也为NAME,命令?NAME显示的结果是______。A.内存变量NAME的值B.字段变量NAME的值C.与该命令之前的状态有关D.错误信息
下列程序段的功能为:单击窗体后,在D盘Temp目录下address.txt 文件中输入“张三,20,Male”。请填空。Private Sub form_ click()Dim name As StringDim age As IntegerDim sex As Stringname = "张三": age = 20: sex = "Male"Open "D:\temp\CodE.txt" For Append As 1______1, name, age, sex______End Sub
设当前表文件中含有字段NAME,系统中有一内存变量的名称也为NAME,下面命令?NAME显示的结果是() A、内存变量NAME的值B、字段变量NAME的值C、与该命令之前的状态有关D、错误信息
设有如下的记录类型: TypeStudent 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="张红"
设有如下的记录类型: Type Student Number As String Name As String Age As Integer End Sub 则能正确引用该记录类型变量的代码是( )。A.Student.name=""B.Dim s As Students.name=“张红”C.Dims As Tye Students.name=“张红”D.DimsAsTypes.name=“张红”
有如下语句: Type Student Name As String Age As Integer Sex As String End Type Dim Stu As Student With Stu .Name="张红" .Age=22 .Sex="女" End With 执行Print Stu.Age语句后的结果是A.张红B.22C.“女”D.Age
设有定义语句int(*f(int);,则下列叙述正确的是( )。A.f是基类型为int的指针变量B.f是指向函数的指针变量,该函数具有一个int类型的形态C.f是指向int类型一维数组的指针变量D.f是函数名,该函数的返回值是其类型为int类型的地址
关于类型转换的说法中,错误的是( )。A.如果a为血型变量,b为char型变量,则a+b的值为血型B.如果a为float型变量,b为int型变量,则a-b的值为float型C.如果a为double型变量,b为float型变量,则a*b的值为double型D.如果a为血型变量,b为血型变量,则a/(double)b的值为int型
Person p = new Person(“张三”,23);这条语句会调用下列哪个构造方法给属性进行初始化() A.public Person(){}B.public Person(String name,int age) { this.name = name; this.age = age; }C.public Person(int age,String name) { this.age = age; this.name = name; }D.public Person(String name) { this.name = name; }
下列关于结构型变量的定义语句中,错误的是( )A.typedef struct CCCB.define GGG struct { char name[20];GGG CCC { char name[20]; int age; int age; }GGG; }; GGG abc ; GGG CCC abc;C.structD.struct { char name[20]; { char name[20]; int age; int age; }ccc; }abc; CCC abc;
设变量 Aname(字符串型),Age(整型)分别表示一个人的姓名和年龄,要设计一个逻辑表达式,当该人姓张,并且超过60岁,则表达式的值为 True,下面正确的是A) Right(Name:1)=“张” And Age>60B) Left(Myname:Len(张")=“张" And age>60C)LetI; Name:Len(张")=张” Or age>60D)M Name ="5k"And Age>60
在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。A、base.Person(name,age)B、base(name,age)C、Person(name,age)D、this(name,age)
假设有列表a=[’name’,’age’,’sex’]和b=[’Dong’,38,’Male’],请使用一个语句将这两个列表的内容转换为字典,并且以列表a中的元素为“键”,以列表b中的元素为“值”,这个语句可以写为()
单选题设当前数据库表文件中含有字段NAME,系统中有一内存变量的名称也为NAME,下面命令NAME显示的结果是().A错误信息B与该命令之前的状态有关C内存变量NAME的值D字段变量NAME的值
单选题假设当前表有字段id、name和age,同时有内存变量id和name,命令“?M-name”显示的是( )。A不确定,和前面的命令有关B当前记录字段name的值C变量不唯一的出错信息D内存变量name的值
单选题若有以下程序#include typedef struct stu{ char name[10],gender; int score; } STU;void f(STU a, STU b){ b = a; printf(%s,%c,%d,, b.name, b.gender, b.score);}main(){ STU a={Zhao, 'm', 290}, b={Qian, 'f', 350}; f(a,b); printf(%s,%c,%d, b.name, b.gender, b.score);}则程序的输出结果是( )。AZhao,m,290,Qian,f,350BZhao,m,290,Zhao,m,290CQian,f,350,Qian,f,350DZhao,m,290,Zhao,f,350
单选题在Person的一个派生类Employee里调用Person类的构造函数正确方式为()。Abase.Person(name,age)Bbase(name,age)CPerson(name,age)Dthis(name,age)
单选题若有以下程序#include #include #include typedef struct stu{ char *name,gender; int score;}STU;void f(char *p){ p=(char *)malloc(10); strcpy(p,Qian);}main(){ STU a={NULL,'m',290},b; a.name=(char *)malloc(10); strcpy(a.name,Zhao); b=a; f(b.name); b.gender='f'; b.score=350; printf(%s,%c,%d,, a.name, a.gender, a.score); printf(%s,%c,%d, b.name, b.gender, b.score);}则程序的输出结果是( )。AQian,m,290,Qian,f,350BZhao,m,290,Qian,f,350CQian,f,350,Qian,t,350DZhao,m,290,Zhao,f,350
单选题有以下程序:#include #include typedef struct stu{ char name[10]; char gender; int score;}STU;void f(char *name,char gender,int score){ strcpy(name,Qian); gender='f'; score=350;}main(){ STU a={Zhao,'m',290},b; b=a; f(b.name,b.gender,b.score); printf(%s,%c,%d,, a.name, a.gender, a.score); printf(%s,%c,%d, b.name, b.gender, b.score);}程序的运行结果是( )。AZhao,m,290,Qian,m,290BZhao,m,290,Zhao,m,290CZhao,m,290,Qian,m,350DZhao,m,290,Qian,f,350
单选题有以下程序:#include typedef struct stu{ char name[10]; char gender; int score; } STU;void f(STU *a, STU *b){ *b = *a; printf(%s,%c,%d,, b-name, b-gender, b-score);}main(){ STU a={Zhao, 'm', 290}, b={Qian, 'f', 350}; f(a,b); printf(%s,%c,%d, b.name, b.gender, b.score);}程序的运行结果是( )。AZhao,m,290,Zhao,m,290BZhao,in,290,Qian,f,350CQian,f,350,Qian,f,350DQian,f,350,Zhao,m,290
单选题有以下程序:#include #include typedef struct stu{ char name[10]; char gender; int score;}STU;void f(STU *c){ strcpy(c-name,Qian); c-gender='f'; c-score=350;}main(){ STU a={Zhao,'m',290},b; b=a; f(b); printf(%s,%c,%d,, a.name, a.gender, a.score); printf(%s,%c,%d, b.name, b.gender, b.score);}程序运行后的输出结果是( )。AZhao,m,290,Qian,f,350BZhao,m,290,Qian,m,290CZhao,m,290,Zhao,m,290DZhao,m,290,Qian,m,350