Chapter Four2
新篇简明英语语言学-Chapter--Four---Syntax

Chapter Four Syntax 句法学一、定义1. syntax句法学:Syntax is a branch of linguistics that studies the rules that govern the formation of sentences.句法学是一门研究语言的规则,这些规则控制句子的形成。
〔把单词凑在一起形成句子〕二、知识点4.2 Category 范畴Syntactic category 句法类型: Words can be grouped together into a relatively small number of classes, called Syntactic category. 单词可以被组成数量相对较小的类别,称为句法类型。
This classification reflects a variety of factors, (1) including the type of meaning that words express, (2) the type of affies that they take, (3) and the type of structures in which they can occur.这种分类反映出各种不同的因素:〔1〕包括单词所表达的意义的类别,〔2〕它们所带词缀的类别,〔3〕它们所能出现的结构的类别。
word level category词层面类型〔对于句法学而言最核心的类型〕1. Major lexical categories 主要词汇类型〔词性〕:名、动、形、副词N, V, Adj, Adv〔open开放性词类,can add new words〕P43图〔在句子构成中起重要作用〕1〕主要词类又称开放词类,可以不断地出现新词。
在英语,它们主要有四类:名词〔N〕: student linguistics lecture动词〔V〕: like red go形容词〔adj〕: tall lovely red副词〔adv〕: loudly constantly hardP134中2. Minor lexical categories 次要词汇类型〔词性〕:限定、程度、量词、助动、介、代、连、叹Det, Deg, Qual, Aux, Prep, Pron, Conj, Int 〔close封闭性词类, words are fixed不添加新词〕P43图2〕次要词类又称闭合词类。
5.Chapter four ( Part II)

• 原来我以为这不过是一种亲热的表示,但是现在 看来,这是为了闻一闻羊羔的味道,来断定是不 是自己生的。 • 在观看足球比赛之后,他有一个重要会议去参加。 • 最理想的情况是, 有朝一日研究人员能够对地 震的成因及具体断层的性质有足够的了解,从而 能够直接预报地震。 • 后来就是这些词把一个美好的世界展现在我的面 前,就像《圣经》上说的“亚伦的杖开了花”一 样。 • 人们都说,柏辽兹指挥管弦乐就像帕格尼尼演奏 小提琴和李斯特弹奏钢琴那样得心应手。
I. Definition
• Amplification, also called addition, means supplying necessary words in our translation on the basis of accurate and complete comprehension of the original and on the basis of different syntax between English and Chinese.
• 9. Air pressure decreases with altitude. • This shows that the resistance of an electric conductor is inversely proportional to its cross-section area. • 10. The principal functions that may be performed by vacuum tubes are rectification, amplification, oscillation, modulation, and detection. • 11. However carefully boiler casings and steam pipes are sealed, some heat escapes and is lost.
chapter4 (2)

• 昆曲
• 昆曲
• 昆曲
• Qinqiang (秦腔, Qínqiāng) or Luantan (Luà n) ntá is the representative folk Chinese opera of the northwest Province of Shaanxi, China, where it was called Qin thousands of years ago. Its melodies were originated from the rural areas of ancient Shaanxi and Gansu. The word itself means "the tune or sound of Qin". • The genre uses the bangzi (woodblock) as one of the accompanying instruments, from which it derives its other name, Bangzi opera. Bangzi tune is the oldest, most affluent opera tune in China's Four Great Characteristic Melodies.
• The texts of yue opera are based on romantic love stories, and they do not include acrobatics or fighting scenes. In yue opera, stage properties and light effects are used and the costumes imitate the light-colored clothes, fashionable at the beginning of this century in China. The most famous plays performed in Shaoxing style are ”Liang Shanpo and Zhu Yingtai”, which is a kind of Chinese version of ”Romeo and Juliet”, and the love dramas "The Dream of a Red Chamber" and "The Romance of a Western Chamber".
Chapter 4 Part II handout

Chapter 4 Part II Handout备注:这是一份上课用讲义,请同学们打印后于本周上课时带上。
II. ExamplesPart I Animals Feel the Heat, Flee Their HabitatsExercise 1: Listen to the news report and get the main idea.What is the main theme of this news?A. People have been sweating out high temperature this summer.B. Animals flee their habitat because of the heat.C. The snake wrangler is not rattled by the drought.D. People take protective measures to keep snakes out.Exercise 2: listen to the news report again and fill the blanks with the exact words or phrases.Katie Couric:they have been sweating out in record heat this summer. But they’re not the only ones. From rattlesnakes to bears, 1_______,great and small, are fleeing theirnatural habitats while the mercury 2____. And, as Sandra Hughes reports, they’returning up in some pretty unlikely places.Bo Slyapich:this is what I find in people’s yards.Sandra Hughes: rattlesnakes----everywhere. More than Bo Slyapich has seen inhis 20-year career as a snake wrangler. The 3 ________ and extreme heat havecombined to drive the thirsty and venomous creatures to close for comfort---backdecks, play equipment –anywhere they can find shade. What are they lookingfor?Bo Slyapich: food. Just like you go to the supermarket to go shopping, they come to our homes to go shopping.Tom Mahan(homeowner): Not too far from those steps 4______, there was a four-foot rattlesnake.Sandra Hughes:homeowner Tom Mahan has found rattlesnake sipping from his pool. Now he’s taken 5__________.Tom Mahan: half-inch grid galvanized fencing around the three-acre perimeter here, which keeps99 percent of any types of snakes out.Sandra Hughes: deer and coyotes are coming down from the hills, too. This disoriented bear climbed up a utility pole in triple-digit heat.Paul Edelman: (the Santa Monica Mountains Conservancy) it is uncharted 6____________. It’s the equivalent of the stories you see with the big droughts in the AfricanSerengetti plains where the animals drop three feet, you know, three feet beforethey get the water hole.Sandra Hughes: in Utah, officials say the drought may have played a role in turning this black bear into a killer. It had to be euthanized after breaking into a family’s tent and7__________ a little boy. Wildlife sightings used to be reserved for trips to theZoo. But experts 8_____________ global warming will bring more extremedroughts, putting more animals in danger. High in the mountains the smallestmember of the rabbit family is disappearing. The pika dies when overheated. Dr. Terry Root (Standford University): 9 _________ that are on the tops of mountains, they don’thave any places else to go. So, where are they gonna go? They’re gonna goextinct.Sandra Hughes: 10______ the only one not rattled by the snake wrangler.Bo Slyapich: Ok. Give me a call back in so we can take care of ya.Sandra Hughes: Sandra Hughes. CBS News, west village, California.Part II Part B Grizzly Population Increasing at YellowstoneExercise: Listen to the news report and choose the best answer to the following questions.1. How many grizzlies were there on the land 200 years ago?A. 500B. 5,000C. 15,000D. 50,0002. Grizzlies have been protected as endangered species since _____.A.1957B.1975C.1970D.19653. How many grizzlies are there currently in and around Yellowstone?A. about 200B. about 1,500C. more than 500D. more than 1,0004. According to Pat Flowers, all the following states will offer hunting permits for grizzlies except____.A. WyomingB. MontanaC. OhioD. Idaho5. Which of the following statements is NOT true according to the report?A. There're 3 states surrounding Yellowstone that will take over management of the bearsinside the park.B. An increasing number of people risk settling in the remote mountainous area, so encounterswith the bears occur more often.C. Though the law has prohibit ed people from hunting grizzlies for 30 years, some statesallow bear hunting nowadays to control their population.D. Whatever happens outside the national park, grizzles inside Yellowstone will not beaffected by any changes in policies.Part III Age Bank in ChinaExercise 1: Listen to the news report and get the main idea.What is the main theme of this news?A. The problems concerning old people in ChinaB. The hours the old people can make a deposit in Bank of ChinaC. The new way of caring for the elderly citizens in ChinaD. The public attitude toward the traditional family in ChinaExercise 2 Listen to the news report again and fill in the blanks with the exact words or phrases.Bob Schieffer: Reporting this week, on how American families are dealing with the needs of 1.__________ as our population ages. Well, tonight, we wanna show you whatthey're doing in China. A community there is come up with 2. __________ forhelping the elderly. Barry Petersen concludes 3. __________ "Caring for Mom &Dad".Barry Petersen: 88-year-old Song Rongxiu is very well taken care of. She lives with her daughter, her grandson and his family in Beijing. That's the way the elderly have 4.__________ been cared for in China. But modem times have created a lot of 5.__________for China's young people —often far from home, and that meansleaving the elderly behind. So here in the city of Chongqing, they had an idea:making a rather unique promise to get people to help their elderly neighbors. Theidea is 6. __________itself. Call it the "Age Bank." People rack up hours, notingthem in a log book. They give their time caring for senior citizens — hours theycan 7. __________in their golden years as the next generation takes care of them.This community leader came up with the idea. "There were a lot of retirees inthis neighborhood," he told us. "They weren't very busy and the very elderlyneeded help." It can be anything from running a quick errand to just stopping infor a daily chat. Wang Dingru is 92 years old.Barry Petersen: What do the helpers do to help you through the day? "They treat me like I'm their mother." She says, "cooking meals, buying groceries." 8. __________Mrs.Zhai, does this work with an eye on her future. "I've been 9.__________ time inthe bank," she says, "so one day people will help me." Like other countries,China has an aging population that is growing fast. To these elderly, the agebank has made volunteers feel like family, and kept Mrs. Wang so spry she canteach me the China two-step — and so happy because even10) ___________,thanks to the "age bank" she has the next best thing: people 10. __________.Barry Petersen, CBS News, Chongqing, China.。
Chapter 2_4

Chapter 2The village of Marlott lay amid the north-eastern undulations of the beautiful Vale of Blakemore or Blackmoor aforesaid, an engirdled and secluded region, for the most part untrodden as yet by tourist or landscape-painter, though within a four hours' journey from London.It is a vale whose acquaintance is best made by viewing it from the summits of the hills that surround it - except perhaps during the droughts of summer. An unguided ramble into its recesses in bad weather is apt to engender dissatisfaction with its narrow, tortuous, and miry ways.This fertile and sheltered tract of country, in which the fields are never brown and the springs never dry, is bounded on the south by the bold chalk ridge that embraces the prominences ofHambledon Hill, Bulbarrow, Nettlecombe-Tout, Dogbury, High Stoy, and Bubb Down. The traveller from the coast, who, after plodding northward for a score of miles over calcareous downs and corn-lands, suddenly reaches the verge of one of these escarpments, is surprised and delighted to behold, extended like a map beneath him, a country differing absolutely from that which he has passed through. Behind him the hills are open, the sun blazes down upon fields so large as to give an unenclosed character to the landscape, the lanes are white, the hedges low and plashed, the atmosphere colourless. Here, in the valley, the world seems to be constructed upon a smaller and more delicate scale; the fields are mere paddocks, so reduced that from this height their hedgerows appear a network of dark green threads overspreading the paler green of the grass. The atmosphere beneath is languorous, and is so tinged with azurethat what artists call the middle distance partakes also of that hue, while the horizon beyond is of the deepest ultramarine. Arable lands arc few and limited; with but slight exceptions the prospect is a broad rich mass of grass and trees, mantling minor hills and dales within the major. Such is the Vale of Blackmoor.The district is of historic, no less than of topographical interest. The Vale was known in former times as the Forest of White Hart, from a curious legend of King Henry III's reign, in which the killing by a certain Thomas de la Lynd of a beautiful white hart which the king had run down and spared, was made the occasion of a heavy fine. In those days, and till comparatively recent times, the country was densely wooded. Even now, traces of its earlier condition are to be found in the old oak copses and irregular belts of timber that yetsurvive upon its slopes, and the hollow-trunked trees that shade so many of its pastures.The forests have departed, but some old customs of their shades remain. Many, however, linger only in a metamorphosed or disguised form. The May-Day dance, for instance, was to be discerned on the afternoon under notice, in the guise of the club revel, or `club-walking', as it was there called.It was an interesting event to the younger inhabitants of Marlott, though its real interest was not observed by the participators in the ceremony. Its singularity lay less in the retention of a custom of walking in procession and dancing on each anniversary than in the members being solely women. In men's clubs such celebrations were, though expiring, less uncommon; but either the natural shyness of the softer sex, or a sarcastic attitude on the part of male relatives, had denudedsuch women's clubs as remained (if any other did) of this their glory and consummation. The club of Marlott alone lived to uphold the local Cerealia. It had walked for hundreds of years, if not as benefit-club, as votive sisterhood of some sort; and it walked still.The banded ones were all dressed in white gowns - a gay survival from Old Style days, when cheerfulness and May-time were synonyms - days before the habit of taking long views had reduced emotions to a monotonous average. Their first exhibition of themselves was in a processional march of two and two round the parish. Ideal and real clashed slightly as the sun lit up their figures against the green hedges and creeper-laced house-fronts; for, though the whole troop wore white garments, no two whites were among them. Some approached pure blanching; some were all had a bluish pallor; some wornby the older characters (which had possibly lain by folded for many a year) inclined to a cadaverous tint, and to a Georgian style.In addition to the distinction of a white frock, every woman and girl carried in her right hand a peeled willow wand, and in her left a bunch of white flowers. The peeling of the former, and the selection of the latter, had been an operation of personal care.There were a few middle-aged and even elderly women in the train, their silver-wiry hair and wrinkled faces, scourged by time and trouble, having almost a grotesque, certainly a pathetic, appearance in such a jaunty situation. In a true view, perhaps, there was more to be gathered and told of each anxious and experienced one, to whom the years were drawing nigh when she should say, `I have no pleasure in them', than of her juvenilecomrades. But let the elder be passed over here for those under whose bodices the life throbbed quick and warm.The young girls formed, indeed, the majority of the band, and their heads of luxuriant hair reflected in the sunshine every tone of gold, and black, and brown. Some had beautiful eyes, others a beautiful nose, others a beautiful mouth and figure: few, if any, had all. A difficulty of arranging their lips in this crude exposure to public scrutiny, an inability to balance their heads, and to dissociate self-consciousness from their features, was apparent in them, and showed that they were genuine country girls, un-accustomed to many eyes.And as each and all of them were warmed without by the sun, so each had a private little sun for her soul to bask in; some dream, some affection, some hobby, at least some remote and distant hope which, though perhaps starving to nothing, still lived on,as hopes will. Thus they were all cheerful, and many of them merry.They came round by The Pure Drop Inn, and were turning out of the high road to pass through a wicket-gate into the meadows, when one of the women said--`The Lord-a-Lord! Why, Tess Durbeyfield, if there isn't thy father riding hwome in a carriage!'A young member of the band turned her head at the exclamation. She was a fine and handsome girl - not handsomer than some others, possibly - but her mobile peony mouth and large innocent eyes added eloquence to colour and shape. She wore a red ribbon in her hair, and was the only one of the white company who could boast of such a pronounced adornment. As she looked round Durbeyfield was seen moving along the road in a chaise belonging to The Pure Drop, driven by a frizzle-headed brawny damsel withher gown-sleeves rolled above her elbows. This was the cheerful servant of that establishment, who, in her part of factotum, turned groom and ostler at times. Durbeyfield, leaning back, and with his eyes closed luxuriously, was waving his hand above his head, and singing in a slow recitative--`I've-got-a-gr't-family-vault-at-Kingsbere - andknighted-forefathers-in-lead-coffins-there!'The clubbists tittered, except the girl called Tess - in whom a slow heat seemed to rise at the sense that her father was making himself foolish in their eyes.`He's tired, that's all,' she said hastily, `and he has got a lift home, because our own horse has to rest to-day.'`Bless thy simplicity, Tess,' said her companions. `He's got his market-nitch. Haw-haw!'`Look here; I won't walk another inch with you, if you say anyjokes about him!' Tess cried, and the colour upon her cheeks spread over her face and neck. In a moment her eyes grew moist, and her glance drooped to the ground. Perceiving that they had really pained her they said no more, and order again prevailed. Tess's pride would not allow her to turn her head again, to learn what her father's meaning was, if he had any; and thus she moved on with the whole body to the enclosure where there was to be dancing on the green. By the time the spot was reached she had recovered her equanimity, and tapped her neighbour with her wand and talked as usual.Tess Durbeyfield at this time of her life was a mere vessel of emotion untinctured by experience. The dialect was on her tongue to some extent, despite the village school: the characteristic intonation of that dialect for this district being the voicing approximately rendered by the syllable UR,probably as rich an utterance as any to be found in human speech. The pouted-up deep red mouth to which this syllable was native had hardly as yet settled into its definite shape, and her lower lip had a way of thrusting the middle of her top one upward, when they closed together after a word.Phases of her childhood lurked in her aspect still. As she walked along to-day, for all her bouncing handsome womanliness, you could sometimes see her twelfth year in her cheeks, or her ninth sparkling from her eyes; and even her fifth would flit over the curves of her mouth now and then.Yet few knew, and still fewer considered this. A small minority, mainly strangers, would look long at her in casually passing by, and grow momentarily fascinated by her freshness, and wonder if they would ever see her again: but to almost everybody she was a fine and picturesque country girl, and no more.Nothing was seen or heard further of Durbeyfield in his triumphal chariot under the conduct of the ostleress, and the club having entered the allotted space, dancing began. As there were no men in the company the girls danced at first with each other, but when the hour for the close of labour drew on, the masculine inhabitants of the village, together with other idlers and pedestrians, gathered round the spot, and appeared inclined to negotiate for a partner.Among these on-lookers were three Young men of a superior class, carrying small knapsacks strapped to their shoulders, and stout sticks in their hands. Their general likeness to each other, and their consecutive ages, would almost have suggested that they might be, what in fact they were, brothers. The eldest wore the white tie, high waistcoat, and thin-brimmed hat of the regulation curate; the second was the normal undergraduate; theappearance of the third and youngest would hardly have been sufficient to characterize him; there was an uncribbed, uncabined aspect in his eyes and attire, implying that he had hardly as yet found the entrance to his professional groove. That he was a desultory tentative student of something and everything might only have been predicted of him.These three brethren told casual acquaintance that they were spending their Whitsun holidays in a walking tour through the Vale of Blackmoor, their course being south-westerly from the town of Shaston on the north-east.They leant over the gate by the highway, and inquired as to the meaning of the dance and the white-frocked maids. The two elder of the brothers were plainly not intending to linger more than a moment, but the spectacle of a bevy of girls dancing without male partners seemed to amuse the third, and make him in no hurryto move on. He unstrapped his knapsack, put it, with his stick, on the hedge-bank, and opened the gate.`What are you going to do, Angel?' asked the eldest.`I am inclined to go and have a fling with them. Why not all of us - just for a minute or two - it will not detain us long?' `No - no; nonsense!' said the first. `Dancing in public with a troop of country hoydens - suppose we should be seen! Come along, or it will be dark before we get to Stourcastle, and there's no place we can sleep at nearer than that; besides, we must get through another chapter of A Counterblast to Agnosticism before we turn in, now I have taken the trouble to bring the book.'`All right - I'll overtake you and Cuthbert in five minutes; don't stop; I give my word that I will, Felix.'The two elder reluctantly left him and walked on taking theirbrother's knapsack to relieve him in following, and the youngest entered the field.`This is a thousand pities,' he said gallantly, to two or three of the girls nearest him, as soon as there was a pause in the dance.`Where are your partners, my dears?'`They've not left off work yet,' answered one of the boldest. `They'll be here by and by. Till then, will you be one, sir?' `Certainly. But what's one among so many!'`Better than none. 'Tis melancholy work facing and footing it to one of your own sort, and no clipsing and colling at all. Now, pick and choose.'`'Ssh - don't be so for'ard!' said a shyer girl.The young man, thus invited, glanced them over, and attempted some discrimination; but, as the group were all so new to him,he could not very well exercise it. He took almost the first that came to hand, which was not the speaker, as she had expected; nor did it happen to be Tess Durbeyfield. Pedigree, ancestral skeletons, monumental record, the d'Urberville lineaments, did not help Tess in her life's battle as yet, even to the extent of attracting to her a dancing-partner over the heads of the commonest peasantry. So much for Norman blood unaided by Victorian lucre.The name of the eclipsing girl, whatever it was, has not been handed down; but she was envied by all as the first who enjoyed the luxury of a masculine partner that evening. Yet such was the force of example that the village young men, who had not hastened to enter the gate while no intruder was in the way, now dropped in quickly, and soon the couples became leavened with rustic youth to a marked extent, till at length theplainest woman in the club was no longer compelled to foot it on the masculine side of the figure.The church clock struck, when suddenly the student said that he must leave - he had been forgetting himself - he had to join his companions. As he fell out of the dance his eyes lighted on Tess Durbeyfield, whose own large orbs wore, to tell the truth, the faintest aspect of reproach that he had not chosen her. He, tool was sorry then that, owing to her backwardness, he had not observed her; and with that in his mind he left the pasture.On account of his long delay he started in a flying-run down the lane westward, and had soon passed the hollow and mounted the next rise. He had not yet overtaken his brothers, but he paused to get breath, and looked back. He could see the white figures of the girls in the green enclosure whirling about asthey had whirled when he was among them. They seemed to have quite forgotten him already.All of them, except, perhaps, one. This white shape stood apart by the hedge alone. From her position he knew it to be the pretty maiden with whom he had not danced. Trifling as the matter was, he yet instinctively felt that she was hurt by his oversight. He wished that he had asked her; he wished that he had inquired her name. She was so modest, so expressive, she had looked so soft in her thin white gown that he felt he had acted stupidly. However, it could not be helped, and turning, and bending himself to a rapid walk, he dismissed the subject from his mind.在前面说过的美丽的布莱克莫尔谷或者叫做黑荒原谷东北部起伏不平的谷地中间,坐落着马洛特村。
Chapter Four Second Language__ Teaching (2)

4.2 Views of language teaching
1. The Discourse-based view DiscourseLinguistic patterns exist across stretches of text. These patterns of language extend beyond the words, clauses and sentences, which have been the traditional concern of much language teaching.
Views diverge greatly as to what kind of input should be provided for language learners. Authentic input :the input should vary in style, mode, medium, and purpose and should be rich in features which are characteristics of authentic discourse in the target language.
Focuses on complete spoken and written texts and on the social and cultural contexts in which such language operates. Accordingly, it aims at developing discourse competence, similar to the wellwell-known concept of communicative competence. competence.
《新英语专业考研英语语言学考点测评(第二版)(北京环球时代学校》读书笔记模板

Linguistics
2020—2022年 度名校命题解 密
读书笔记
读书笔记
这是《新英语专业考研英语语言学考点测评(第二版)(北京环球时代学校英语专业考研点睛丛书;全国英 语专业考研必读书)》的读书笔记模板,可以替换为自己的心得。
精彩摘录
精彩摘录
这是《新英语专业考研英语语言学考点测评(第二版)(北京环球时代学校英语专业考研点睛丛书;全国英 语专业考研必读书)》的读书笔记模板,可以替换为自己的精彩内容摘录。
新英语专业考研英语语言学考 点测评(第二版)(北京环球
时代学校
读书笔记模板
01 思维导图
03 目录分析 05 精彩摘录
目录
02 内容摘要 04 读书笔记 06 作者介绍
思维导图
本书关键字分析思维导图
北京环球 时代学校
书
英语专业 考研
音系
词汇
现代
语言学
语言学
考点 语言学
外语教学
考点
语言
计算机
社会
文化
语音
变体
内容摘要
内容摘要
《新英语专业考研英语语言学考点测评》是“北京环球时代学校英语专业考研点睛丛书”之一。本书是考研 必读红宝书《最新英语专业考研英语语言学考点测评》的修订版。修订版首次提供了2020-2022年度名校命题解 密。本书的章节划分以脉络清晰、兼收并蓄为目标,前五章基本上按照胡壮麟先生主编的《语言学教程》确定, 后五章在《语言学教程》的基础上根据目前试题的侧重点的不同而有所归并,每一章都提供考点总结、各典型高 校真题分析和大量的练习题。本书在统计和研究了数十所大学的考研真题的基础上编写,包括北京外国大学、上 海外国语大学、中山大学、天津外国语大学、四川大学等,是英语专业考研学生的必备参考书之一。
英语词汇学Chapter 04.2

(exceptions: brothers-in-law,
passersby,
women-doctors, etc)
2. Written Forms of Compounds
a. Solid:
earthquake, sunrise, etc.
b. Hyphenated: wedding-ring, under-wear ;
city-dweller;
pain-killer;
breakthrough;
buildup (猛增);
get-together (联欢会); setup (计划);
7) adverb + verb: outbreak; outcome; upgrade; overturn; download; 8) combining form + ds
Compound nouns/ verbs/ adjectives;
Compound preposition: alongside
Compound conjunction: whereas, whenever
Compound adverb: moreover, indeed
a stay-at-home night; an ahead-of-schedule election; a devil-may-care attitude; (不认真的) a never-to-be-forgotten movie;
an up-in-the-air decision;
1) from back-formation(逆生) baby-sitter→ to baby-sit;
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
if/else Selection Structure
• Nested if/else structures – One inside another, test for multiple cases – Once condition met, other statements skipped
false
34 is true
Author: J. de Wet
10
relational operator
Operator == != < > <= >= Meaning equivalent to not equal to less than greater than less than or equal to greater than or equal to
23
Logical Operators
• Used as conditions in loops, if statements • && (logical AND)
– true if both conditions are true if ( gender == 1 && age >= 65 ) ++seniorFemales;
4
例 从键盘输入大写字母,用小写字母输出
#include <iostream> using namespace std; int main() { char c1,c2; cin>>c1; cout<<c1<<endl; c2=c1+32; cout<<c2<<endl; return 0; }
输入:A 输出:A a
17
1.
IF(条件表达式)
语句;
表达式 1 语句 0
或
IF(条件表达式) { } 语句;
或
IF(条件表达式); 语句;
空语句作IF中的语句
18
2. if...else 语句
if(条件表达式) 语句1; else 语句2;Y 判断语句1N
语句2
例 判闰年 #include <iostream.h> void main() { int year; cout << "Please input a year..."; cin >> year; // think about the sequence of the logical expression if (year %4 == 0 && year % 100 != 0 || year % 400 == 0) cout << "The year is leap year "; else cout << "The year isn't leap year "; }
if student’s grade is greater than or equal to 90 Print “A” else if student’s grade is greater than or equal to 80 Print “B” else if student’s grade is greater than or equal to 70 Print “C” else if student’s grade is greater than or equal to 60 Print “D” else Print “F”
——嵌套
一般形式
if ( ) if ( else else if ( else ) 语句 1 语句 2 语句 3 语句 4
)
注意
语句 1、2、3、4 可以是复合语句,每层的 if 与 else 配对,或用 { } 来确定层次关系。
22
– if ~ else 配对原则:缺省{ }时,else总是和它 上面离它最近的未配对的if配对 if(……) if(……) if(……) else…... else…... else…...
16
if 语句
——三种形式
if (表达式) 语句
例:if (x>y) cout<<x;
if (表达式) 语句1 else 语句2
例:if (x>y) cout<<x; else cout<<y;
if (表达式1) 语句1 else if (表达式2) 语句2 else if (表达式3) 语句3 … else 语句 n
2
•
Control Structures
control structures – Sequence structure • Programs executed sequentially by default – Selection structures •if, if/else, switch – Repetition structures(Iteration) • while, do/while, for
6
顺序结构
思考:鸡兔同笼,已知鸡兔总头数为h,总 脚数为f,求鸡兔各多少只?
分析:设鸡x只,兔y只 则x+y=h,2*x+4*y=f从而可解得x=2h-1/2f y=f/2-h
7
if Selection Structure
• Selection structure – Choose among alternative courses of action – Pseudocode example: If student’s grade is greater than or equal to 60 Print “Passed” – If the condition is true • Print statement executed, program continues to next statement – If the condition is false • Print statement ignored, program continues
5
#include <iostream> #include <cmath> using namespace std; main() { float a,b,c,disc,x1,x2,p,q; 输入:1 3 2 cin>>a>>b>>c; 输出:x1=-1.00 disc=b*b-4*a*c; x2=-2.00 p=-b/(2*a); q=sqrt(disc)/(2*a); x1=p+q; x2=p-q; cout<<"x1=“<<x1<<endl; cout<<"x2="<<x2<<endl; }
• Block
– Set of statements within braces
15
if/else Selection Structure
• Example
if ( grade >= 90 ) cout << "A"; else if ( grade >= 80 ) cout << "B"; else if ( grade >= 70 ) cout << "C"; else if ( grade >= 60 ) cout << "D"; else cout << "F"; // 90 and above // 80-89 // 70-79 // 60-69 // less than 60
Learn C++ through English and Chinese
Lecture 4: Selection and Iteration (选择与循环)
Chapter Four: Selection and Iteration (选择与循环)
• Selection(选择) The if statement The switch statement The conditional operator ?: Iteration(循环) The while statement The do-while loop The for statement
11
relational operator
• 关系运算是比较简单的一种逻辑运算, 优先次序为: < <= > >= == !=
优先级相同(高) 优先级相同(低)
• 关系表达式是一种最简单的逻辑表达 式
其结果类型为 bool,值只能为 true 或 false。
• 例如:a>b,c<=a+b,x+y==3
8
if Selection Structure
• Translation into C++ If student’s grade is greater than or equal to 60 Print “Passed” if ( grade >= 60 ) cout << "Passed"; • if structure – Single-entry/single-exit
9
if Selection Structure
• Flowchart of pseudocode statement
A decision can be made on any expression.
grade >= 60 true
zero - false