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. 【LOJ】#2291. 「THUSC 2016」补退选

    题解 在trie树上开vector记录一下这个前缀出现次数第一次达到某个值的下标,以及记录一下现在这个前缀有多少个 为什么thusc有那么水的题--是为了防我这种cai ji爆零么= = 代码 #in ...

  2. 更快的速度、更好的服务——易普优APS云排程

    众所周知软件执行效率受制于硬件性能,市面上的APS产品多为单机版本,企业要应用好APS,保证紧急插单.计划下发全程无忧,用户电脑硬件性能是不容忽视的一大瓶颈.APS的直接用户是车间管理人员.计划员,而 ...

  3. html+css制作五环(代码极简)

    五环 把五环做成一个浮动,总是位于屏幕中央的效果. 难点 定位的练习 position :fixed 位于body中间的时候 left:50%:top:50%; css内部样式表的使用 style=& ...

  4. Music in Car CF 746F

    题目:http://codeforces.com/problemset/problem/746/F 先感叹一下题目之长! 一些测试样例在后面给出. 题目大意: Sasha 去工作的路上喜欢听歌,途中经 ...

  5. 2018用IDEA搭建SSM框架(Spring+SpringMVC+Mybatis)

    使用IDEA搭建ssm框架 环境 工具:IDEA 2018.1 jdk版本:jdk1.8.0_171 Maven版本:apache-maven-3.5.3 Tomcat版本:apache-tomcat ...

  6. java异常及日志注意事项

    一.异常注意事项 简单整理了下关于异常的规范: 1)      在异常处理模块中应提供精确.易读的错误原因信息. 2)      不要处理能够避免的异常. 3)      一个方法不应该抛出太多类型的 ...

  7. python functools.wraps

    我们在使用装饰器的时候,有些函数的功能会丢失,比如func.__name__,func.__doc__,func.__module__ 比如下面这个例子: In [16]: def logged(fu ...

  8. 在Windows上安装FFmpeg程序

    原文地址:http://helloway.blog.51cto.com/7666282/1642247 FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.它提供了录 ...

  9. 【20181102T1】优美的序列【二分+ST表】

    题面 [正解] 相当于是 \(GCD_{i=L}^{R} A_i = min_{i=L}^{R} \{A_i\}\) 然后GCD可以用ST表实现\(O(log A_i)\)查询 并且GCD是递减的,所 ...

  10. TortoiseGit + msysgit 记住帐号密码方法及使用密匙的方法

    Windows 重度用户只能用 for windows 的软件了,所以虽然使用 Git,但还是要找专门的 windows 版本. 最近开始使用 GitHub 来托管一些小项目/兴趣,而自己是重度 wi ...