1、请写出如下程序的输出结果和运行原理: age = 13 if age >= 18: print('your age is', age) print('adult') else: print('your age is', age) print('teenager')
第1题:
A.age=0
B.age=null
C.age=
D.程序编译错误
第2题:
使用VC6打开考生文件夹下的工程test19_1,此工程包含一个源程序文件test19_1.cpp,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:
1:
weight:5
age:0
2:
weight:7
age:9
源程序文件test19_1.cpp 清单如下:
include <iostream.h>
class animal
{
public:
/**************** found *******************/
friend void setvalue(animal&,int);
/**************** found *******************/
void print()
protected:
int itsweight;
int itsage;
};
void animal::print()
{
cout<<"weight:"<<itsweight<<end1;
cout<<"age:"<<itsage<<end1;
}
void setvalue(animal &ta,int tw)
{
ta.itsweight=tw;
ta.ihsage=0;
}
void setvalue(animal &ta,int tw, int tn)
{
ta.itsweight=tw;
ta.itsage=tn;
}
void main()
{
/**************** found *******************/
animal peppy
setvalue(peppy,5);
cout<<"1:"<<end1;
peppy.print();
setvalue(peppy,7,9);
cout<<"2:"<<end1;
peppy.print();
}
第3题:
有如下语句: 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.22
C.“女”
D.Age
第4题:
在Visual FoxPro中,使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该的使用命令是( )。
A. REPLACE AGE WITH AGE+1
B. MODIFY STUDENT SET AGE=AGE+1
C. ALTER STUDENT SET AGE WITH AGE+1
D. UPDATE STUDENT SET AGE=AGE+1
第5题:
已知一个人出生的年、月、日分别存放在变量y0、m0、d0中,当前日期的年、月、日分别存放在变量y1、m1、d1中,这个人的实足年龄存放在变量age中。则以下可以正确计算实足年龄的程序段是
A.age=y1-y0 If m1<m0 Then age=age-1 ElseIf d1<d0 Then age=age-1 End If
B.age=y1—y0 If m1<m0 Or d1<d0 Then age=age-1 End If
C.age=y1-y0 If m1<m0 Then age=age-1 End If If m1=m0 And d1<d0 Then age=age-1 End If
D.age=y1-y0 If m1<m0 Then age=age-1 End If If d1<d0 Then age=age-1 End If
第6题:
How old are you? May I ask your age? What is your age?
第7题:
A.10
B.16
C.12
D.14
第8题:
dataframe对象a有’Name’和’Age’两列,运行a.drop(’Age’,axis=1)后,a中的’Age’列被删除。
第9题:
使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是()。
第10题:
You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35. Which two EL code snippets will return true for this condition? ()
第11题:
0
10
20
30
第12题:
${client.age in [25,35]}
${client.age between [25,35]}
${client.age between 25 and 35}
${client.age <= 35 && client.age >= 25}
${client.age le 35 and client.age ge 25}
第13题:
根据SQL标准,要修改表student中所有学生的年龄age,使之在原值基础上减一,下面哪个语句适用?()
A update student set age = 1
B update student set age = age - 1
C update age = age -1 from student
D update from student where age = age -1
第14题:
阅读以下说明C++代码,将应填入(n)处的字句写在对应栏内。
[说明]
本程序实现了雇员信息管理功能,其中封装了雇员信息及其设置、修改、删除操作。已知当输入为“Smith 31 2960.0”时,程序的输出是:
姓名:Smith 年龄:31 工资:2960
姓名:Smith 年龄:31 工资:3500
姓名:Mary 年龄:23 工资:2500
[C++程序]
include <iostream.h>
include <string.h>
class employee{
char *name; //雇员姓名
short age; //年龄
float salary;//工资
public:
employee();
void set_name(char *);
void set_age(short a) {age=a;}
void set_salary(float s) {salary=s;}
(1);
~ employee(){delete[] name;}
};
employee::employee() { name="";
age=0;
salary=0.0;
void employee::set_name(char *n)
{ name=new char[strlen(n)+1];
(2) (name,n);
}
void employee::print()
{ cout<<"姓名":"<<name<<" 年龄:"<<agc<<" 工资:" <<salary<<endl;
}
void main()
{ char *na;
short ag=0;
float sa=0;
(3);
na=new char[10];
cin>>na>>ag>>sa;
emp.set_name(na);
emp.set_age(ag);
emp.set_salary(sa);
emp.print();
(4) (3500.0);
emp.print();
(5);
emp.set_name("Mary");
emp.set_age(23);
emp.set_salary(2500.0);
emp.print();
}
第15题:
在Visual FoxPro中,使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是
A.REPLACE AGE WITH AGE+1
B.UPDATE STUDENT AGE WITH AGE+1
C.UPDATE SET AGE WITH AGE+I
D.UPDATE STUDENT SET AGE=AGE+1
第16题:
在Visual FoxPro中,使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是A)REPLACEAGE WITH AGE+1B)UPDATE STUDENT AGE WITH AGE+1C)UPDATE SET AGE WITH AGE+1D)UPDATE STUDENT SET AGE=AGE+1
第17题:
在Visual FoxPro中,使用SQL命令将学生STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是 ______。
A.REPLACE AGE WITH AGE+1
B.UPDATE STUDENT AGE WITH AGE+1
C.UPDATE SET AGE WITH AGE+1
D.UPDATE STUDENT SET AGE=AGE+1
第18题:
与WHERE AGE BETWEEN 18 AND 23完全等价的是( )。
A.WHERE AGE>18AND AGE
B.WHERE AGE>=18AND AGE
C.WHERE AGE>18AND AGE
D.WHERE AGE>=18AND AGE
第19题:
You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25. Which EL code snippet will returntrue for this condition?()
第20题:
在VisualFoxPro中,使用SQL命令将学生STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是()。
第21题:
与WHERE AGE BETWEEN 18 AND 23完全等价的是()
第22题:
class MyApp{ public static void main(String[] args){ int age; System.out.println(“age=”+age); } } 执行上述代码后输出的结果是哪项?()
第23题:
${calcAge(client.birthDate) < 25}
${calcAge[client.birthDate] < 25}
${funct:age(client.birthDate) < 25}
${funct:age[client.birthDate] < 25}
${funct:calcAge(client.birthDate) < 25}
第24题:
Hua,18,Tong,20
Hua,18,Qin,19
Tong,19,Qin,19
Hua,19,Tong,19