欢迎来到个人简历网!永久域名:gerenjianli.cn (个人简历全拼+cn)
当前位置:首页 > 范文大全 > 实用文>掌握for语句的用法

掌握for语句的用法

2023-09-25 08:30:16 收藏本文 下载本文

“Bouquet”通过精心收集,向本站投稿了6篇掌握for语句的用法,下面是小编给大家整理后的掌握for语句的用法,欢迎大家借鉴与参考,希望对大家有所帮助。

掌握for语句的用法

篇1:掌握for语句的用法

[教学目的与要求]

[课时按排]

1课时。

[教学重点与难点]

for 语句的执行过程

[教材分析与教法建议]

备课时,预先准备一段程序,以实现从1+2+3+......100为例,计算出结果,在导入新课时,激发学生兴趣。

[参考资料]

以c#为例。

for语句是构成循环的最灵活而又最简便的方法,在循环次数一定的前提下,使用for语句非常的方便。其格式为:

for(表达式1;布尔表达式2;表达式3)

{

循环体

}

其中表达式1和表达式3以及表达式3这三项都是可选的,表达式1为循环控制变量做初始化,循环控制变量可以1个或是多个(用豆号隔开),布尔表达式2为循环控制条件,起到控制整个循环的开始与结束作用,也可以有一个或多个语句,表达式3按规律改变循环变量的值。

3.使用for 语句的注意事项

(1)正确理解for语句的执行过程。

(2)控制好结束条件,避免陷入死循环。

?/p>

[教学目的与要求]

(1)进一步掌握循环语句的用法。

(2)了解for语句的执行过程,掌握其用法 。

(3)能用for语句实现简单的程序。

[课时安排]

1课时。

[教学重点与难点]

for 语句的执行过程的理解以及其用法

[教学准备]

多媒体投影仪或多媒体网络、一台能运行c#development编译器的计算机。

[教学过程]

一、导入

从数学家高斯小时候的故事说起,从1+2+3+......100的结果来引入问题,然后引出本节课的学习重点。for语句

二、新授

1. for语句的格式

for(表达式1;布尔表达式2;表达式3)

{

循环体

}

2.for语句的执行过程。

(1)求解表达式1

(2)判断布尔表达式2的值,若为假,则结束循环,否则继续执行。

(3)执行循环体,然后计算表达式3,转到第二步。

3.for语句的流程图

(略)

4、例题:2个

例1

计算从1+2+3+......+1000的值

using system;

class class1

{

public static void main

{

int sum=0,i;

for(i=1;i<=100;i++)

{

sum=sum+i;

}

console.writeline(“sum={0}”,sum);

程序结果:sum=5050

例2

打印杨辉三角

三、总结

今天,我们学习了 循环语句for 语句的用法,课后大家还要将课本上的例题给做了,多加练习,以此提高对程序设计的更高程度的认识.

篇2:掌握单词的用法

作者:张和平

海贝:今天又要麻烦大家了。对于单词,我从一开始就努力运用各种方法来记忆,效果还真不错。那么在掌握单词的同时我还需要注意什么呢?

舒盈盈:只记住单词,不等于掌握了英语。只有熟练掌握了单词的用法,才可以说是走向了英语成功之路。对于单词的用法我们首先要掌握其结构要求,尤其是动词。例如beat是“打败、获胜”之意,它后面要求跟其主语一致,如:人、队等,而不能跟“比赛”之类词语相搭配。所以我们不能说“We beat the basketball match.”而要说“We beat them in the basketball match.” (在篮球比赛中我们打败了他们。)

刘双旭:谈起动词的结构,我们必须注意动词的主语要求是“人”还是“物”,可不可以跟宾语,谓语动词是否延续等等。以下几个错句都是因为我们对谓语动词的用法不了解所造成的,例如:

1. I cost ten yuan for the book. 这里动词cost要求主语为“物”,所以此句要改为The book cost me ten yuan.

2. He is listening the teacher. listen是不及物动词,不能直接跟宾语,后面要加to。

3. He has borrowed the book for three weeks. borrowed一词不表示延续性,因此不可与表示一段时间的状语连用,应改为kept。

4. He gave up to learn English. give up表示“放弃”,后面要跟动名词作宾语, to learn应改为learning。

栗彬:不仅要掌握单词的结构要求,也要熟记单词的固定搭配。如busy一词,其主语通常是人,表示“某人忙于某事”,英语通常用介词with。例如:我的工作很忙,英语是I am busy with my work. 又如动词look,后面介词不同,含义不同:接for表示“寻找”;接after表示“照看”;接at表示“看......”。

赵美茹:对词语的辨析我们也应掌握,否

则在运用时就会出错。如表示“也”的单词有too, also, either等。哪一个用在肯定句的句中,哪一个用在肯定句的句尾,哪一个用在否定句的句末,这些我们必须了如指掌。

海贝:学习单

词这么多讲究啊!今后我一定多加留心。

篇3:掌握过去分词作状语的用法

Peiod 3 Language study

张寨中学高二英语组

一、学法导引

掌握单词和短语glory,shade,audience,dare,be supposed to do等的用法。

掌握过去分词作状语的用法。

二、重点难点聚焦

1.glory .n (1)光荣;荣誉;壮丽

Those who died bravely in battle earned everlasting glory.

在战场上英勇牺牲的人赢得了永恒的荣誉。

Our team didn’t exactly cover itself with glory today.

我队今天未能真正载誉而归。

(2)荣耀的事,值得赞赏的事(cn)

When that bush comes into flower it is the glory of the whole garden.

那矮树丛开花时,就成了整个花园的光彩夺目之处。

2.shade n (色彩的)浓淡深浅,(图画、照相等的)暗部,阴凉处,荫

Do you like the blouse in this shade?

你喜欢这种色度的女衬衫吗?

The threes give some shade from the sun.

这些树遮住了阳光,很舒适凉快。

相关链接:

shade 指遮挡住太阳的任何地方。

Shadow 由某物构成的黑影。

3.Audience n

(1) 听众,观众

A large audience enjoyed every word he said.

为数众多的观众欣赏他的每一句话。

Then the audience disappeared slowly.

然后观众慢慢散去。

(2)这个词也可作可数名词

There was a large audience at the concert.

音乐会有大批观众。

(3)“观众”作为整体看待时,动词用单数,看作许多人时动词用复数,有时两种形式都可用。

4.dare

(1) 用作情态动词后接不带to的不定式,主要用于疑问、否定、或条件句。

How dare you speak to me like that?

你怎么敢这样对我说话?

No one dare talk about it.

谁也不敢谈这件事。

(2)用作行为动词后接带to的不定式。

He dares to do all he says he will.

凡是他说他要干的事,他都敢干。

Try it if you dare.

要是你敢的话,你就试试看。

注意:①dare用作情态动词通常不用于肯定句。

误:She dare walk in the street at night.

正:She dares to walk in the street at night.

夜里她不敢一个人在街上走。

②dare作行为动词,用于否定句时,后面的不定式符号可省略。

They did not (to) enter the burning house.

③ I dare say 是固定用法,作插入语

There is something worng with the radio, I dare say.

收音机恐怕有点毛病。

5.be supposed to do....应该做....(=should do)

be not supposed to do ....禁止做谋事....

You are supposed to start work at 8:30 every morning.

你应该每天上午8点30分工作。

You are not supposed to be there.

你不可到那边去。

三、法诠释A、B

A、重点内容

(1)转换问题

过去分词作状语可以表示时间、原因、条件、让步、方式或伴随情况等,可以转化成相应的状语从句。例如:

1.表示时间,相当于一个时间状语从句,有时过去分词前可加连词when或while来强调时间概念。

Seen from the top of the hill, the city looked like a big garden.

从山顶上看,这个城市就像一个大花园。

Accepted by the Party, he decided to devote his life to the cause of the Party.

入党以后,他决定献身于党的事业。

2.表示原因,相当于一个原因状语从句。

Deeply moved by the story, the excited people stopped quarrelling with each other. 激动的人们被那个故事深深地感动了,停止了争吵。

Encouraged by the speech, the young people made up their minds to take up the struggle.受到了讲演的鼓舞,年轻人决定起来斗争。

3.表示条件,相当于一个条件状语从句,有时过去分词前可用if等词。

Given another chance, he will do better. 再给他一次机会,他会做得更好。

If heated, water can be turned into steam. 水如果被加热,会变成水蒸气。

4.表示让步,相当于一个though/although引导的让步状语从句。

Exhausted by the running, they went on running after the robber.

尽管已经跑得筋疲力尽,他们还是继续追赶着那个强盗。

Laughed at by many people, he continued his study.

尽管被许多人嘲笑,他还是继续他的研究。

5.表示方式或伴随情况。

The old man went into the room, supported by his wife.

那个老人在他的妻子的搀扶下走进了房间。

Seated at the table, my father and I were talking about my job.

我和父亲坐在桌子旁边讨论着我的工作问题。

6.过去分词无论作什么状语,其逻辑主语应是主句的主语。

【误】Seen from the mountain, we found the building is very small.

【正】Seen from the mountain, the building is very small.

【误】Written carelessly, he made a serious mistake in the letter.

【正】Written carelessly, the letter had a serious mistake.

(2)现在分词和过去分词作状语时的用法比较

不管是现在分词还是过去分词作状语,如果单独作状语,其逻辑主语必须和主句的主语一致。分词作状语通常可以转换成一个相应的状语从句,如果状语从句中的谓语动词为被动结构,就用过去分词;如果状语从句中的谓语动词为主动结构,就用现在分词。有时为了强调,分词前可带连词when, while, if, though, as if, unless等一起作状语,以便使句子的意思更清楚、更连贯。例如:

Working hard (If you work hard), you will succeed.

如果你努力,你会成功的。

[b]Defeated (= Though he was defeated), he remained a popular boxer.

虽然他被击败了,但他仍然是一个受人喜爱的拳击手。

B、难点内容

1、分词作时间或条件状语时,为了明确其意义有时可在分词前加上when,while,if 等连词。

If merely drawn on your imagination, the report will not be convincing.

假若仅靠你的想象去写,报告是不会有说服力的。

Once (it is)seen, it will be forgotten.

After (he was) shot in the leg, he couldn’t run any more.

2、分词的独立结构

1) 分词作状语时,要特别注意其逻辑主语必须和谓语动词的主语一致。否则,分词必须有自己的主语,这种带主语的分词被称为分词的独立结构,或叫独立主格。在句中作状语,表示时间、原因、条件等。例如:

The project finished, they had a two weeks’ leave.

完成那个计划后,他们休了两周假。

2) 独立结构有时也可以用“with/ without + 名词(或代词的宾语)+ 分词”的结构,表示伴随状况。例如:

They sat there silently, (with) their eyes fixed on the lake.

他们静静地坐在那里,眼睛看着湖面。

四、高考真题链接

1. ____ , I have to put it away and focus my attention on study this week. (上海春)

A. However the story is amusing

B. No matter amusing the story is

C. However amusing the story is

D. No matter how the story is amusing

【点拨】选C。however引导让步状语从句时,必须后跟一个形容词或副词,只有C项符合这一要求。

2. We're going to ____ with some friends for a picnic. Would you like to join us?(北京2004春)

A. get inB. get overC. get alongD. get together

【点拨】选D。get together表示“相聚”;get in收获(庄稼);get over越过,克服;get along进行,进展。

3. I feel it is your husband who ____ for the spoiled child. (上海春)

A. is to blameB. is going to blame

C. is to be blamedD. should blame

【点拨】选A。be to blame(该受责备)是主动形式,表示被动意义。

4. Paper money was in use in ____ China when Marco Polo visited the country in ____ thirteenth century. (NMET )

A. the; 不填B. the; theC.不填; theD. 不填; 不填

【点拨】选C。in use是固定搭配,意为“在使用”;序数词前用定冠词the表示顺序或位次。

5. The students are ____ young people between the ages of sixteen and twenty. (NMET 1988)

A. mostB. almostC. mostlyD. at most

【点拨】选B。根据句意,“这些学生大多是16到20岁的年轻人”得知,mostly是最佳答案。

(Keys: 1─5 BDBAA 6─10 DCCCA )

Peiod 3 Language study

张寨中学高二英语组

一、学法导引

掌握单词和短语glory,shade,audience,dare,be supposed to do等的用法。

掌握过去分词作状语的用法。

二、重点难点聚焦

1.glory .n (1)光荣;荣誉;壮丽

Those who died bravely in battle earned everlasting glory.

----------------------------------------------------------------------------------------------------------------

Our team didn’t exactly cover itself with glory today.

------------------------------------------------------------------------------------------------------------------

(2)荣耀的事,值得赞赏的事(cn)

When that bush comes into flower it is the glory of the whole garden.

-----------------------------------------------------------------------------------------------------------------

2.shade n (色彩的)浓淡深浅,(图画、照相等的)暗部,阴凉处,荫

Do you like the blouse in this shade?

------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------

这些树遮住了阳光,很舒适凉快。

相关链接:

shade 指遮挡住太阳的任何地方。

Shadow 由某物构成的黑影。

3.Audience n

(2) 听众,观众

------------------------------------------------------------------------------------------------------------------

为数众多的观众欣赏他的每一句话。

------------------------------------------------------------------------------------------------------------------

然后观众慢慢散去。

(2)这个词也可作可数名词

------------------------------------------------------------------------------------------------------------------

音乐会有大批观众。

(3)“观众”作为整体看待时,动词用单数,看作许多人时动词用复数,有时两种形式都可用。

4.dare

(2) 用作情态动词后接不带to的不定式,主要用于疑问、否定、或条件句。

------------------------------------------------------------------------------------------------------------------

你怎么敢这样对我说话?

------------------------------------------------------------------------------------------------------------------

谁也不敢谈这件事。

(3)用作行为动词后接带to的不定式。

------------------------------------------------------------------------------------------------------------------

凡是他说他要干的事,他都敢干。

------------------------------------------------------------------------------------------------------------------

要是你敢的话,你就试试看。

注意:①dare用作情态动词通常不用于肯定句。

误:She dare walk in the street at night.

正:She dares to walk in the street at night.

夜里她不敢一个人在街上走。

②dare作行为动词,用于否定句时,后面的不定式符号可省略。

They did not (to) enter the burning house.

③ I dare say 是固定用法,作插入语

There is something worng with the radio, I dare say.

收音机恐怕有点毛病。

5.be supposed to do....应该做....(=should do)

be not supposed to do ....禁止做谋事....

---------------------------------------------------------------------------

你应该每天上午8点30分工作。

You are not supposed to be there.

你不可到那边去。

三、法诠释A、B

A、重点内容

(1)转换问题

过去分词作状语可以表示时间、原因、条件、让步、方式或伴随情况等,可以转化成相应的状语从句。例如:

1. 表示时间,相当于一个时间状语从句,有时过去分词前可加连词when或while来强调时间概念。

------------------------------------------------------------------------------------------------------------

从山顶上看,这个城市就像一个大花园。

Accepted by the Party, he decided to devote his life to the cause of the Party.

入党以后,他决定献身于党的事业。

2.表示原因,相当于一个原因状语从句。

Deeply moved by the story, the excited people stopped quarrelling with each other. ----------------------------------------------------------------------------------------------------

Encouraged by the speech, the young people made up their minds to take up the struggle.受到了讲演的鼓舞,年轻人决定起来斗争。

3.表示条件,相当于一个条件状语从句,有时过去分词前可用if等词。

-----------------------------------------------------------------------------------------------------------

. 再给他一次机会,他会做得更好。

------------------------------------------------------------------------------------------------------------

. 水如果被加热,会变成水蒸气。

4.表示让步,相当于一个though/although引导的让步状语从句。

Exhausted by the running, they went on running after the robber.

尽管已经跑得筋疲力尽,他们还是继续追赶着那个强盗。

------------------------------------------------------------------------------------------------------------

尽管被许多人嘲笑,他还是继续他的研究。

5.表示方式或伴随情况。

------------------------------------------------------------------------------------------------------------

那个老人在他的妻子的搀扶下走进了房间。

------------------------------------------------------------------------------------------------------------

我和父亲坐在桌子旁边讨论着我的工作问题。

6.过去分词无论作什么状语,其逻辑主语应是主句的主语。

【误】Seen from the mountain, we found the building is very small.

【正】Seen from the mountain, the building is very small.

【误】Written carelessly, he made a serious mistake in the letter.

【正】Written carelessly, the letter had a serious mistake.

(2)现在分词和过去分词作状语时的用法比较

不管是现在分词还是过去分词作状语,如果单独作状语,其逻辑主语必须和主句的主语一致。分词作状语通常可以转换成一个相应的状语从句,如果状语从句中的谓语动词为被动结构,就用过去分词;如果状语从句中的谓语动词为主动结构,就用现在分词。有时为了强调,分词前可带连词when, while, if, though, as if, unless等一起作状语,以便使句子的意思更清楚、更连贯。例如:

Working hard (If you work hard), you will succeed.

如果你努力,你会成功的。

[b]Defeated (= Though he was defeated), he remained a popular boxer.

虽然他被击败了,但他仍然是一个受人喜爱的拳击手。

B、难点内容

1、分词作时间或条件状语时,为了明确其意义有时可在分词前加上when,while,if 等连词。

If merely drawn on your imagination, the report will not be convincing.

假若仅靠你的想象去写,报告是不会有说服力的。

Once (it is)seen, it will be forgotten.

After (he was) shot in the leg, he couldn’t run any more.

2、分词的独立结构

1) 分词作状语时,要特别注意其逻辑主语必须和谓语动词的主语一致。否则,分词必须有自己的主语,这种带主语的分词被称为分词的独立结构,或叫独立主格。在句中作状语,表示时间、原因、条件等。例如:

The project finished, they had a two weeks’ leave.

完成那个计划后,他们休了两周假。

2) 独立结构有时也可以用“with/ without + 名词(或代词的宾语)+ 分词”的结构,表示伴随状况。例如:

They sat there silently, (with) their eyes fixed on the lake.

他们静静地坐在那里,眼睛看着湖面。

四、高考真题链接

1. ____ , I have to put it away and focus my attention on study this week. (上海2004春)

A. However the story is amusing

B. No matter amusing the story is

C. However amusing the story is

D. No matter how the story is amusing

【点拨】选C。however引导让步状语从句时,必须后跟一个形容词或副词,只有C项符合这一要求。

2. We're going to ____ with some friends for a picnic. Would you like to join us?(北京2004春)

A. get inB. get overC. get alongD. get together

【点拨】选D。get together表示“相聚”;get in收获(庄稼);get over越过,克服;get along进行,进展。

3. I feel it is your husband who ____ for the spoiled child. (上海2002春)

A. is to blameB. is going to blame

C. is to be blamedD. should blame

【点拨】选A。be to blame(该受责备)是主动形式,表示被动意义。

4. Paper money was in use in ____ China when Marco Polo visited the country in ____ thirteenth century. (NMET 1999)

A. the; 不填B. the; theC.不填; theD. 不填; 不填

【点拨】选C。in use是固定搭配,意为“在使用”;序数词前用定冠词the表示顺序或位次。

5. The students are ____ young people between the ages of sixteen and twenty. (NMET 1988)

A. mostB. almostC. mostlyD. at most

【点拨】选B。根据句意,“这些学生大多是16到20岁的年轻人”得知,mostly是最佳答案。

五、跟踪反馈

1. After his journey from abroad, Richard Jones returned home, ____ . (上海2004春)

A. exhausting B. exhausted C. being exhausted D. having exhausted

2. Suddenly, a tall man driving a golden carriage ____ the girl and took her away, ____ into the woods. (上海2004春)

A. seizing; disappeared B. seized; disappeared

C. seizing; disappearing D. seized; disappearing

3. Generally speaking, ____ according to the directions, the drug has no side effect. (上海)

A. when taking B. when taken C. when to take D. when to be taken

4. Friendship is like money: easier made than ____ . (上海2003春)

A. kept B. to be kept C. keeping D. being kept

5. Unless ____ to speak, you should remain silent at the conference. (上海2003春)

A. invited B. inviting C. being invited D. having invited

6. The research is so designed that once ____ nothing can be done to change it. (NMET 2002)

A. begins B. having begun C. beginning D. begun

7. ____ from heart trouble for years, Professor White has to take some medicine with him wherever he goes.(上海春)

A. Suffered B. Suffering C. Having suffe D. Being suffered

8. If ____ the same treatment again, he is sure to get well. (上海)

A. giving B. give C. given D. being given

9. ____ in thought, he almost ran into the car in front of him. (NMET )

A. Losing B. Having lost C. Lost D. To lose

10. “Can't you read?” Mary said ____ to the notice. (MET 1993)

A. angrily pointing B. and point angrily C. angrily pointed D. and angrily pointing

篇4:六道经典SQL语句题完全掌握SQL语句

六道经典SQL语句题完全掌握SQL语句

学生表S (SNO 学号, Sname 姓名, Class 班级, Shigh 身高)

课程表C(CNO 课程号, CName 课程名, CPreNO 预修课程编码)

成绩表SC(CNO 课程号, SNO 学号, SCgrade 成绩)

1、体育生选拔,要求身高在170cm以上,考试不及格课程在3门以下(不包括3门)平均成绩在60分以上,

学号   姓名   身高   平均成绩

2、所有预选课程都已经合格的学生(预选课程不存在嵌套循环的情况)。

3、同时选修了‘离散数学’与‘组成原理’的,且高等数学成绩大于80分的。

学号    姓名   离散数学  组成原理   高等数学

分数    分数     分数

4、列出各门课程前三名(成绩相同,学号小的排名在前)

第一名       第二名       第三名

课程名  班级:姓名:成绩  班级:姓名:成绩  班级:姓名:成绩

5、统计各科的学习情况。

课程名   60以下   [60,70)   [70,85)   [85,100)

6、按班级统计各科平均成绩。

课程名   第一       第二       第三

班级:平均成绩  班级:平均成绩  班级:平均成绩

7、按班级统计各科平均成绩后,第一名3分,第二名2分,第三名1分,其他计0.5分(可以并列名次),最后给班级排名。(最后成绩一样,按班级序号小的排前)

第一名      第二名      第三名

[sql]

--第1题

select td_b.SNO 学号, td_b.SNAME 姓名, td_b.SHIGH 身高, td_a.avgGrade平均成绩 from

(select S.SNO,avg(SCgrade) as avgGrade from S,SC

where

S.SNO = SC.SNO and

S.Shigh>170

group by S.SNO

having

avg(SCgrade)>60) td_a

left join(

select * from S where not exists (

select a.sno from S a, SC b where

a.sno = b.sno

and b.scgrade<60

group by a.sno

having count(*) < 3)

) td_b

on td_a.SNO = td_b.SNO

--第2题

--第3题

select distinct S1.SNO as 学号, S1.SNAME as 姓名,

(select SC.SCgrade from SC,C where SC.CNO=C.CNO and C.CNAME='离散数学' and SC.SNO = SC1.SNO) as 离散数学,

(select SC.SCgrade from SC,C where SC.CNO=C.CNO and C.CNAME='组成原理' and SC.SNO = SC1.SNO) as 组成原理,

(select SC.SCgrade from SC,C where SC.CNO=C.CNO and C.CNAME='高等数学' and SC.SNO = SC1.SNO) as 高等数学

from SC SC1, S S1

where

SC1.SNO = S1.SNO

and S1.SNO in

(

select S.SNO from S,C,SC

where

S.SNO = SC.SNO and

SC.CNO = C.CNO and

C.CNAME='离散数学' and

S.SNO in (select t1.SNO from SC t1, C t2 where t1.CNO=t2.CNO and t2.cname='组成原理') and

S.SNO in (select t3.SNO from SC t3, C t4 where t3.CNO=t4.CNO and t4.Cname='高等数学'and t3.scgrade>80)

)

----另解

select distinct s.sno,s.sname,

(select scgrade from sc left join c on sc.cno=c.cno where c.cname='离散数学' and sc.sno=sc1.sno)“离散数学”,

(select scgrade from sc left join c on sc.cno=c.cno where c.cname='组成原理' and sc.sno=sc1.sno) “组成原理”,

(select scgrade from sc left join c on sc.cno=c.cno where c.cname='高等数学' and sc.sno=sc1.sno) “高等数学”

from s,sc sc1,C

where sc1.sno=s.sno

and s.sno in

(

select sno from sc left join c on sc.cno=c.cno where c.cname='离散数学' intersect

select sno from sc left join c on sc.cno=c.cno where c.cname='组成原理' intersect

select sno from sc left join c on sc.cno=c.cno where c.cname='高等数学' and sc.scgrade>80)

--第4题

select C.CNAME as 课程名,

max(case when ro=1 then '班级:'||td_b.class||' 姓名:'||S.SNAME||' 成绩:'||td_b.SCgrade else null end) as 第一名,

max(case when ro=2 then '班级:'||td_b.class||' 姓名:'||S.SNAME||' 成绩:'||td_b.SCgrade else null end) as 第二名,

max(case when ro=3 then '班级:'||td_b.class||' 姓名:'||S.SNAME||' 成绩:'||td_b.SCgrade else null end) as 第三名

from

(

select td_a.CNO, td_a.SNO, td_a.class, td_a.SCgrade, row_number over(partition by CNO order by SCgrade desc) ro

from

(select CNO, S.SNO, Class, SCgrade

from S inner join SC

on S.SNO = SC.SNO

group by CNO, S.SNO, Class, SCgrade

order by S.SNO)td_a

)td_b , C, S

where td_b.cno = C.CNO and td_b.sno = S.SNO

group by CNAME

--第5题

select c.cname “课程号”,

sum(case when (scgrade<60) then 1 else 0 end) “60分以下”,

sum(case when (scgrade<70 and scgrade>=60) then 1 else 0 end) “[60,70)”,

sum(case when (scgrade<85 and scgrade>=70) then 1 else 0 end) “[70,85)”,

sum(case when (scgrade<=100 and scgrade>=85) then 1 else 0 end) “[85,100]”

from sc,c

where sc.cno=c.cno

group by c.cname

order by c.cname

--第6题

select CNAME 课程名,

max(case when ro=1 then '班级:'||td_b.Class||'平均成绩:'||td_b.K_avg else null end) 第一,

max(case when ro=2 then '班级:'||td_b.Class||'平均成绩:'||td_b.K_avg else null end) 第二,

max(case when ro=3 then '班级:'||td_b.Class||'平均成绩:'||td_b.K_avg else null end) 第三

from

(

select td_a.CNO, td_a.Class, td_a.K_avg, row_number() over(partition by CNO order by K_avg desc)ro

from

(select distinct CNO, Class, avg(SCgrade)K_avg

from S inner join SC

on S.SNO = SC.SNO

group by CNO, class

order by class)td_a

)td_b, C

where td_b.CNO = C.CNO

group by CNAME

order by CNAME

--第7题

----没有max选出来有三行数据(td_e有三行数据),有了max就只有一行数据了正为所有数据

select max(case when rownum=1 then td_d.class else null end) 第一名,

max(case when rownum=2 then td_d.class else null end) 第二名,

max(case when rownum=3 then td_d.class else null end) 第三名

from

(

select td_c.class, sum1+sum2+sum3+sum4 as tscore

from

(

select td_b.class,

sum(case when ro=1 then 3 else 0 end) as sum1,

sum(case when ro=2 then 2 else 0 end) as sum2,

sum(case when ro=3 then 1 else 0 end) as sum3,

sum(case when ro1 and ro2 and ro3 then 0.5 else 0 end) as sum4

from

(

select td_a.CNO, td_a.Class, td_a.K_avg, row_number() over(partition by CNO order by K_avg desc)ro

from

(select distinct CNO, Class, avg(SCgrade)K_avg

from S inner join SC

on S.SNO = SC.SNO

group by CNO, class

order by class)td_a

)td_b

group by td_b.class

order by td_b.class

)td_c

order by tscore desc

)td_d

篇5:卸妆油的正确用法 你掌握了吗

步骤1:卸妆油使用比平时多一倍的量于黑头粉刺处按摩约3-5分钟。

步骤2:再加点水,乳化按摩1-2分钟。

步骤3:用清水冲净后,发现顽固的黑头粉刺会被溶解出来了耶!

篇6:卸妆油的正确用法 你掌握了吗

步骤1:先正常使用卸妆油一遍后。

步骤2:用热毛巾敷脸约3-5分钟,待毛孔张开。

步骤3:再用卸妆油仔细按摩粉刺堵塞处3-5分钟。

步骤4:用清水冲净后,渐渐被油脂卸除力强的卸妆油给分解了。

这样的方法一周可以进行一至两次。油会将毛孔中阻塞的油质溶解出来,反而可以减少粉刺机率,但是要选对卸妆油,然后用后再用洗面奶洗。

用洁颜油会不会引发致痘性,还是端看这瓶洁颜油有没有使用到不该用的危险成分。此外卸妆油的使用方式如果不正确,或是使用的是20多度的清水而非是摄氏40度左右的温水,或是乳化不完全,或是没有使用大量的清水清洗,都会引发痘痘满脸生。

要聪明用卸妆油,基本上加水的比例要对,简单来说,若要卸除淡妆,水就要多一些,反之若要卸浓妆,水则要少一点。这是因为卸妆油加水按摩进行乳化时,若添加的水较少,乳化效果较佳,这时乳液感就会较为浓绸,适合卸除较浓郁的妆,反之水若加的多,乳液感较为轻盈,溶解浓妆的清洁效果就会较为逊色。换言之,若要卸浓妆建议先用干燥的手取用先在脸上按摩,再用水冲洗脸部,反之若卸的是淡妆则建议将产品倒在手掌心内,并在手掌心加一点水进行乳化再按摩脸上进行卸妆动作,降低对肌肤的刺激。

温馨提示:卸妆油使用不当容易引起痘痘,特别是油性肌肤要谨慎使用。要把卸妆油涂抹在未打湿的脸上,用来溶化彩妆,再用水洗净,不要让卸妆油在脸上停留的时间过长。一般的卸妆油必须用摄氏40度左右的温水才能清洗干净,如果用冷水,会让油脂残留在脸上,引发粉刺。

【掌握for语句的用法】相关文章:

1.掌握单词的用法

2.掌握基础知识作文

3.如何掌握近义词

4.语句

5.英语语法掌握情态动词

6.掌握文言文的技巧

7.如何掌握数学思维

8.掌握学习方法的名言

9.如何掌握课堂读后感

10.作文:自己掌握命运

下载word文档
《掌握for语句的用法.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度: 评级1星 评级2星 评级3星 评级4星 评级5星
点击下载文档

文档为doc格式

  • 返回顶部