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. grep、find命令整理

    一.grep格式: grep [选项]... PATTERN [FILE]...(默认的PATTERN是一个基本的正则表达式(BRE)) 参数选项 1.杂项: -s, --no-messages 不显 ...

  2. Cordova 打包签名

    1.第一步 在项目根目录下运行命令cordova build --release android,会在testApp\platforms\android\build\outputs\apk目录下生成一 ...

  3. 2017 Bangladesh National High School Programming Contest ( National Round, Senior Group ), NHSPC 2017 题解

    [题目链接] A. Charm Is Not Always Enough 模拟一下就可以了. #include <bits/stdc++.h> using namespace std; i ...

  4. Extjs设置或获取cookie

    设置cookie var myCookie = Ext.util.Cookie.set(‘YourCookieName’,'YourValue’); 读取cookie Ext.util.Cookie. ...

  5. uboot的使用

    嵌入式软件的层次: bootloader +boot_parameter+kernel+ boot filesystem <uboot的编译> 1)将uboot压缩文件拷贝到 linux系 ...

  6. [Luogu5105]不强制在线的动态快速排序

    首先集合去重不影响答案,然后打表易得连续自然数平方差异或前缀和的规律,于是问题就变为在线维护区间求并同时更新答案,set记录所有区间,每次暴力插入删除即可.由于每个区间至多只会插入删除一次,故均摊复杂 ...

  7. 问题记录:未设置为接受端口“文件和打印机共享(SMB)”上的连接

    解决办法: 网络(右击)——属性——本地连接(右击)——属性——此连接使用下列选项——Microsoft网络的文和打印共享(打上勾)

  8. Android之基于HTTP协议的通信详解

    Android系统中本身是有下载机制的,比如浏览器使用的DownloadManager.可遗憾的是,DownloadManager只提供给浏览器使用,一般的应用程序没法调用它. 另外,如果下载调用频繁 ...

  9. Codeforces Round #296 (Div. 1) C. Data Center Drama 欧拉回路

    Codeforces Round #296 (Div. 1)C. Data Center Drama Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xx ...

  10. HDU 5137 How Many Maos Does the Guanxi Worth 最短路 dijkstra

    How Many Maos Does the Guanxi Worth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/5 ...