Coursera课程Python for everyone:chapter6
Chapter 6 Quiz
10 试题
What does the following Python Program print out?
str1 = "Hello" str2 = 'there' bob = str1 + str2 print bob
Hellothere
Hello there
Hello
there
Hello
What does the following Python program print out?
x = '40' y = int(x) + 2 print y
402
42
int402
x2
How would you use the index operator [] to print out the letter q from the following string?
x = 'From marquard@uct.ac.za'
print x[q]
print x[8]
print x[9]
print x[-1]
print x[7]
How would you use string slicing [:] to print out 'uct' from the following string?
x = 'From marquard@uct.ac.za'
print x[14:17]
print x[14:3]
print x[15:18]
print x[14+17]
print x[15:3]
print x[14/17]
What is the iteration variable in the following Python code?
for letter in 'banana' :print letter
letter
for
'banana'
in
What does the following Python code print out?
print len('banana')*7
bananabananabananabananabananabananabanana
42
banana7
0
How would you print out the following variable in all upper case in Python?
greet = 'Hello Bob'
console.log(greet.toUpperCase());
print uc($greet);
print greet.upper()
puts greet.ucase;
Which of the following is not a valid string method in Python?
boldface()
upper()
lower()
lstrip()
startswith()
What will the following Python code print out?
data = 'From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008' pos = data.find('.') print data[pos:pos+3]
mar
uct
Sat
.ma
Which of the following string methods removes whitespace from both the beginning and end of a string?
strip()
split()
wsrem()
strtrunc()
Coursera课程Python for everyone:chapter6相关推荐
- Coursera课程Python for everyone:Quiz: Many-to-Many Relationships and Python
Many-to-Many Relationships and Python 9 试题
- Coursera课程Python for everyone:Quiz: Multi-Table Relational SQL
Multi-Table Relational SQL 10 试题 1. What is the primary added value of relational databases over fla ...
- Coursera课程Python for everyone:Quiz: Single-Table SQL
Single-Table SQL 11 试题 1. Structured Query Language (SQL) is used to (check all that apply) Delete d ...
- Coursera课程Python for everyone:Quiz: Object Oriented Programming
Object Oriented Programming 11 试题 1. Which came first, the instance or the class? instance class fun ...
- Coursera课程Python for everyone:Quiz: REST, JSON, and APIs
REST, JSON, and APIs 10 试题 1. Who is credited with getting the JSON movement started? Pooja Sankar M ...
- Coursera课程Python for everyone:Quiz: eXtensible Markup Language
eXtensible Markup Language 10 试题 1. What is "serialization" when we are talking about web ...
- Coursera课程Python for everyone:Quiz: Reading Web Data From Python
Reading Web Data From Python 8 试题 1. Which of the following Python data structures is most similar t ...
- Coursera课程Python for everyone:Quiz: Networks and Sockets
Networks and Sockets 10 试题 1. What do we call it when a browser uses the HTTP protocol to load a fil ...
- Coursera课程Python for everyone:Quiz: Regular Expressions
Quiz: Regular Expressions 10 试题 1. Which of the following best describes "Regular Expressions&q ...
最新文章
- 触发器——创建||更新||删除||查看
- 【Leetcode】背包问题模板
- windows 2008 R2下(AD RMS)无法检索证书层次结构的解决方法
- 实现 JavaScript 异步方法 Promise.all
- 分布式消息中间件-Rocketmq
- HttpURLConnection与 HttpClient 区别/性能测试对比
- python人脸_Python 使用 face_recognition 人脸识别
- access month函数用法_学会了这7个EXCEL日期函数技巧,老板再让你加班,你找我!...
- python内置模块重要程度排名_python常用内置模块
- 刘海、水滴、挖孔都靠边!中兴吐槽:不配全面屏
- 这7本O’Reilly推出的免费Python电子书,够你看了
- 摩托罗拉里程碑升级Android 2.2刷机知识
- php日志接入rsyslog,php – Rsyslog重复日志(rsyslog.conf和rsyslog.d / something.conf)
- 济南 天然气 暖气 物业费 水费 电费价格
- Fiddler中文版设置抓取某个网站的信息 2021-07-31
- win7未能成功安装驱动服务器,win7插入鼠标提示未能成功安装设备驱动程序的解决办法...
- 简单解决某盘限速?(黑科技)【油猴】+【某盘直链下载器】+【IDM下载】
- (仅对于普通12分频的51单片机而言)机器周期,时钟周期,晶振振荡频率(fosc)的关系;(51、32通用)分频的原理和作用
- 在北京租房 舒舍的租客素质怎么样?
- #3189. 八纵八横(c)
热门文章
- 无法安装计算机的启动配置,“windows 无法更新计算机的启动配置。安装无法继续”这样解决...
- linux 删除20日前数据,Linux 维护常用命令
- 实现正则表达式的*和?匹配
- Visual Studio 2013开发 mini-filter driver step by step 内核代码段分页alloc_text的使用(9)
- Visual Studio 2013开发 mini-filter driver step by step (3) - 查看运行结果
- RocketMQ-初体验RocketMQ(07)-使用API操作RocketMQ_顺序消息 ordermessage
- 并发编程-03线程安全性之原子性(Atomic包)及原理分析
- linux命令行引导iso,如何在Linux上使用命令行从可启动ISO创建可启动USB?
- MySQL This function has none of DETERMINISTIC, NO SQL...错误1418 的原因分析及解决方法
- python 合并区间