问题 单项选择题

对布尔表达式进行短路求值是指:无须对式中所有操作数或运算符进行计算就可确定表达式的值。对于表达式“b or((c>d)and a)”,()时可进行短路计算。

A.d为true

B.a为true

C.b为true

D.c为true

答案

参考答案:C

解析:

[分析]: 本题考查布尔表达式的计算。

对于布尔运算符and:x and y的值为真,当且仅当x和y都为真。若x为假,则不管y是真是假,x and y都为假。

对于布尔运算符or:x or y的值为假,当且仅当x和y都为假。若x为真,则不管y是真是假,x or y都为真。

对于表达式“b or((c>d) and a)”,若b为真,则不管((c>d) and a)是真是假,整个表达式的值都为真。

完形填空
Have a good idea and want to make money out of it ? just do it. This is also the advice given by 17-year-old Nick D’Aloisio. The British schoolboy         a mobile phone news app(应用软件)and sold it to Yahoo for about $30 million.
Nick got his first                  when he was 9 and he used it to create movies. He began writing apps              the age of 12. In 2011, he created a free app named “Summly”. It can divide(把…分成) news stories into different groups and help its users to read what they want in an           and fast way. The app had been downloaded (下载) almost a million          before he sold it to Yahoo.
Nick said he had the            of “Summly” when he was preparing for a history exam. He felt so frustrated(受挫,灰心) after he searched for some information on the Internet. There was so much information he wanted on the Internet, but it had not been ordered. He decided         something about it. At last, the clever schoolboy turned his good idea           something real. How will Nick          so much money?
The teen millionaire(千万富翁) said “…I will get a new computer,too. but at the moment, I         want to save and bank it.”
小题1:
A.createdB.wroteC.discoveredD.made
小题2:
A.bookB.inventionC.computerD.bike
小题3:
A.byB.afterC.untilD.at
小题4:
A.easyB.easilyC.easierD.hard
小题5:
A.dollarsB.timesC.piecesD.copies
小题6:
A.wayB.ideaC.planD.dream
小题7:
A.doingB.didC.doD.to do
小题8:
A.toB.onC.intoD.in
小题9:
A.payB.costC.spendD.take
小题10:
A.stillB.justC.everD.even
选择题