Chapter 1

10 试题

1. 

When Python is running in the interactive mode and displaying the chevron prompt (>>>) - what question is Python asking you?

What is the next machine language instruction to run?

What is your favourite color?

What Python statement would you like me to run?

What Python script would you like me to run?

2. 

What will the following program print out:

>>> x = 15
>>> x = x + 5
>>> print x

20

5

15

"print x"

x + 5

3. 

Python scripts (files) have names that end with:

.exe

.py

.doc

.png

4. 

Which of these words is a reserved word in Python ?

for

names

pizza

payroll

5. 

What is the proper way to say “good-bye” to Python?

quit()

#EXIT

while

// stop

6. 

Which of the parts of a computer actually executes the program instructions?

Secondary Memory

Main Memory

Input/Output Devices

Central Processing Unit

7. 

What is "code" in the context of this course?

A way to encrypt data during World War II

A sequence of instructions in a programming language

A password we use to unlock Python features

A set of rules that govern the style of programs

8. 

A USB memory stick is an example of which of the following components of computer architecture?

Output Device

Central Processing Unit

Main Memory

Secondary Memory

9. 

What is the best way to think about a "Syntax Error" while programming?

The computer is overheating and just wants you to stop to let it cool down

The computer needs to have its software upgraded

The computer did not understand the statement that you entered

The computer has used GPS to find your location and hates everyone from your town

10. 

Which of the following is not one of the programming patterns covered in Chapter 1?

Conditional Steps

Random steps

Sequential Steps

Repeated Steps

Python for everyone chapter 1的更多相关文章

  1. Python编程指南 chapter 1

    1.python使用方括号[]来存取一个序列中的某个数据项,像字符串.列表等包含若干数据项的序列都采用这种方法. 2.强制类型转换,int('24234'),str(235) 3.python中没有变 ...

  2. Python学习笔记–Chapter 2

    1.字符串中添加制表符,可使用字符组合\t 2.字符串中添加换行符,可使用字符组合\n 3.字符串\n\t可以换到下一行,并且在开头添加一个制表符. 4.删除末尾空白,使用方法rstrip() 5.删 ...

  3. Python学习笔记 chapter 2基础

    程序输入 >>> print('%s is number %d'%('Python', 1))Python is number 1 输出重定向有问题(待定) 文本输入>> ...

  4. 实验一个最小的PYTHON服务器编程

    没事,玩玩儿~~~:) 按书上的例子来作.. #!/usr/bin/env python #Simple Server - Chapter 1 -server.py import socket hos ...

  5. Coursera课程《Python数据结构》中课件

    You can access the Google Drive containing all of the current and in-progress lecture slides for thi ...

  6. Python服务器开发 -- 网络基础-乾颐堂

    网络由下往上分为物理层.数据链路层.网络层.传输层.会话层.表示层和应用层. HTTP是高层协议,而TCP/IP是个协议集,包过许多的子协议.包括:传输层的 FTP,UDP,TCP协议等,网络层的ip ...

  7. Python 能干什么

    二.Python 只适合测试? 关于Python是一种什么样的语言,这里不打算说对象.类之类的术语.我们可以先来看一看,时至今日 Python 都在哪些领域里得以应用: 电信基础设施 (Twilio) ...

  8. Python服务器开发 -- 网络基础

    Python服务器开发 -- 网络基础   网络由下往上分为物理层.数据链路层.网络层.传输层.会话层.表示层和应用层.HTTP是高层协议,而TCP/IP是个协议集,包过许多的子协议.... 网络由下 ...

  9. Python服务器开发二:Python网络基础

    Python服务器开发二:Python网络基础   网络由下往上分为物理层.数据链路层.网络层.传输层.会话层.表示层和应用层. HTTP是高层协议,而TCP/IP是个协议集,包过许多的子协议.包括: ...

随机推荐

  1. 解决loadrunner 脚本和replaylog中的中文乱码问题

    解决loadrunner 脚本和replaylog中的中文乱码问题 解决这个问题必须认识到一个事实就是,loadrunner和测试服务器交换数据使用的是utf8格式,但是展现在replaylog中是使 ...

  2. bzoj 1212: [HNOI2004]L语言

    思路:字典树+dp, dp[ i ] 表示 前缀到 i 能不能被理解, 如果dp[ i ] 是能被理解的那么, 把i + 1, i + 2 ....  在字典树上走,走到一个单词就转移. ,这样可行的 ...

  3. java的组合和继承

    其实我第一次学习java 的时候根本没有听说过组合这个名词,老师也更没有讲解过,我一直以为是我自己落掉了什么知识点,其实不是的,组合这个名词暂且把它定义为一个思维性的东西吧,相信读者都接触过了,但是并 ...

  4. OpenJudge——0003:jubeeeeeat

    OpenJudge——0003:jubeeeeeat 描述 众所周知,LZF很喜欢打一个叫Jubeat的游戏.这是个音乐游戏,游戏界面是4×4的方阵,会根据音乐节奏要求玩家按下一些指定方块(以下称co ...

  5. JAVAEE——SpringMVC第二天:高级参数绑定、@RequestMapping、方法返回值、异常处理、图片上传、Json交互、实现RESTful、拦截器

    1. 课前回顾 https://www.cnblogs.com/xieyupeng/p/9093661.html 2. 课程计划 1.高级参数绑定 a) 数组类型的参数绑定 b) List类型的绑定 ...

  6. 【java】Hibernate saveOrUpdate失效以及补救方案

    有个需求是如果unique key不存在则插入,存在则更新. 简单的方式先select一下再insert 或者update,但是嫌太麻烦而且慢,所以采用Hibernate中session.saveOr ...

  7. mysql store procedure 存储过程

    参考资料: 1.http://blog.sina.com.cn/s/blog_52d20fbf0100ofd5.html 2.https://dev.mysql.com/doc/refman/5.7/ ...

  8. 在chrome开发者工具中观察函数调用栈、作用域链、闭包

    在chrome的开发者工具中,通过断点调试,我们能够非常方便的一步一步的观察JavaScript的执行过程,直观感知函数调用栈,作用域链,变量对象,闭包,this等关键信息的变化.因此,断点调试对于快 ...

  9. 决策树算法(C4.5)

    ID3具有一定的局限性,即信息增益倾向于选择取值比较多的特征(特征越多,条件熵(特征划分后的类别变量的熵)越小,信息增量就越大),C4.5通过选择最大的信息增益率 gain ratio 来选择节点可以 ...

  10. bzoj4399 魔法少女LJJ 线段树合并

    只看题面绝对做不出系列.... 注意到\(c \leqslant 7\),因此不会有删边操作(那样例删边干嘛) 注意到\(2, 5\)操作十分的有趣,启示我们拿线段树合并来做 操作\(7\)很好处理 ...