1、请写出如下程序的输出结果和运行原理: age = 13 if age >= 18: print('your age is', age) print('adult') else: print('your age is', age) print('teenager')

1、请写出如下程序的输出结果和运行原理: age = 13 if age >= 18: print('your age is', age) print('adult') else: print('your age is', age) print('teenager')


参考答案和解析
24464

相关考题:

数据库SQL语言中,AGE IN(15,35)短语的正确含义是(14)。A.AGE=15AND AGE=35B.AGE=15 OR AGE=35C.AGE<=35 AND AGE>=15D.AGE<35 AND AGE>15

SQL中,“AGE IN(15,35)”短语的正确含义是( )。A.AGE=15 AND AGE=35B.AGE=15 OR.AGE=35C.AGE<=35 AND AGE>=15D.AGE<35 AND AGE>15

SQL中,“AGE IN(15,35)”短语的正确含义是A.AGE=15 AND AGE=35B.AGE=15 OR AGE=35C.AGE<=35 AND AGE>=15D.AGE<35 AND AGE>15

17 ) SQL 中, " AGE IN ( 15 , 35 ) " 短语的正确含义是A ) AGE = 1 5 AND AGE = 35B ) AGE = 1 5 OR AGE = 35C ) AGE = 35 AND AGE = 15D ) AGE 3 5 AND AGE 15

classMyApp{publicstaticvoidmain(String[]args){intage;System.out.println(age=”+age);}}执行上述代码后输出的结果是哪项?() A.age=0B.age=nullC.age=D.程序编译错误

根据SQL标准,要修改表student中所有学生的年龄age,使之在原值基础上减一,下面哪个语句适用?()A update student set age = 1B update student set age = age - 1C update age = age -1 from studentD update from student where age = age -1

使用VC6打开考生文件夹下的工程test19_1,此工程包含一个源程序文件test19_1.cpp,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:1:weight:5age:02:weight:7age: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 peppysetvalue(peppy,5);cout<<"1:"<<end1;peppy.print();setvalue(peppy,7,9);cout<<"2:"<<end1;peppy.print();}

阅读以下说明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();}

有如下语句: 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

在Visual FoxPro中,使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是A.REPLACE AGE WITH AGE+1B.UPDATE STUDENT AGE WITH AGE+1C.UPDATE SET AGE WITH AGE+ID.UPDATE STUDENT SET AGE=AGE+1

在Visual FoxPro中,使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该的使用命令是( )。A. REPLACE AGE WITH AGE+1B. MODIFY STUDENT SET AGE=AGE+1C. ALTER STUDENT SET AGE WITH AGE+1D. UPDATE STUDENT SET AGE=AGE+1

在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

已知一个人出生的年、月、日分别存放在变量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 IfB.age=y1—y0 If m1<m0 Or d1<d0 Then age=age-1 End IfC.age=y1-y0 If m1<m0 Then age=age-1 End If If m1=m0 And d1<d0 Then age=age-1 End IfD.age=y1-y0 If m1<m0 Then age=age-1 End If If d1<d0 Then age=age-1 End If

在Visual FoxPro中,使用SQL命令将学生STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是 ______。A.REPLACE AGE WITH AGE+1B.UPDATE STUDENT AGE WITH AGE+1C.UPDATE SET AGE WITH AGE+1D.UPDATE STUDENT SET AGE=AGE+1

How old are you? May I ask your age? What is your age?

与WHERE AGE BETWEEN 18 AND 23完全等价的是( )。A.WHERE AGE>18AND AGEB.WHERE AGE>=18AND AGEC.WHERE AGE>18AND AGED.WHERE AGE>=18AND AGE

下列程序共输出_______个值:1. age = 232. start = 2 3. if age % 2 != 0: 4.start = 1 5. for x in range(start, age + 2, 2): 6.print(x) A.10B.16C.12D.14

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?()A、${calcAge(client.birthDate)  25}B、${calcAge[client.birthDate]  25}C、${funct:age(client.birthDate)  25}D、${funct:age[client.birthDate]  25}E、${funct:calcAge(client.birthDate)  25}

dataframe对象a有’Name’和’Age’两列,运行a.drop(’Age’,axis=1)后,a中的’Age’列被删除。

在VisualFoxPro中,使用SQL命令将学生STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是()。A、REPLACE AGE WITH AGE+1B、UPDATE STUDENT AGE WITH AGE+1C、UPDATE SET AGE WITH AGE+1D、UPDATE STUDENT SET AGE=AGE+1

使用SQL命令将学生表STUDENT中的学生年龄AGE字段的值增加1岁,应该使用的命令是()。A、REPLACE AGE WITH AGE+1B、UPDATE STUDENT AGE WITH AGE+1C、UPDATE SET AGE WITH AGE+1D、UPDATE STUDENT SET AGE=AGE+1

与WHERE AGE BETWEEN 18 AND 23完全等价的是()A、WHERE AGE>18AND AGE<23B、WHERE AGE>=18AND AGE<23C、WHERE AGE>18AND AGE<=23D、WHERE AGE>=18AND AGE<=23

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? ()A、${client.age in [25,35]}B、${client.age between [25,35]}C、${client.age between 25 and 35}D、${client.age = 35  client.age = 25}E、${client.age le 35 and client.age ge 25}

class MyApp{   public static void main(String[] args){  int age;   System.out.println(“age=”+age);  }  }   执行上述代码后输出的结果是哪项?()  A、age=0B、age=nullC、age=D、程序编译错误

单选题在C#中〃下列代码的运行结果是()。int[]age1=newint[]{10,20};int[]age2=age1;age2[1]=30;Console.WriteLine(age1[1]);A0B10C20D30

单选题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?()A${calcAge(client.birthDate)  25}B${calcAge[client.birthDate]  25}C${funct:age(client.birthDate)  25}D${funct:age[client.birthDate]  25}E${funct:calcAge(client.birthDate)  25}

多选题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? ()A${client.age in [25,35]}B${client.age between [25,35]}C${client.age between 25 and 35}D${client.age = 35  client.age = 25}E${client.age le 35 and client.age ge 25}

单选题有以下程序:#include #include typedef struct{ char name[10]; char sex; int age;}STU;void fun(STU *t){ strcpy((*t).name,Tong); (*t).age++;}main(){ STU s[2] = {Hua, 'm', 18, Qin, 'f', 19}; fun(s+1); printf(%s,%d,%s,%d, s[0].name, s[0].age, s[1].name, s[1].age);}程序运行后的输出结果是(  )。AHua,18,Tong,20BHua,18,Qin,19CTong,19,Qin,19DHua,19,Tong,19