#1

print "Welcome to Python!"

#2

my_variable = 

#3

# Set the variables to the values listed in the instructions!
my_int =
my_float = 1.23
my_bool = True

#4

# my_int is set to  below. What do you think
# will happen if we reset it to and print the result? my_int = # Change the value of my_int to on line ! my_int = # Here's some code that will print my_int to the console:
# The print keyword will be covered in detail soon! print my_int

#5

def spam():
eggs =
return eggs
print spam()

#6

def spam():
eggs =
return eggs
print spam()

#7

spam = True
eggs = False

#8

#fuck you
mysterious_variable =

#9

"""
"""

#10

# Set count_to equal to the sum of two big numbers
count_to = + print count_to

#11

#Set eggs equal to  using exponentiation on line !

eggs = **

print eggs

#12

#Set spam equal to  using modulo on line !

spam =  % 

print spam

#13

#fuck you
monty = True
python = 1.234
monty_python = python**

#14

# Assign the variable meal the value 44.50 on line !
meal = 44.50

#15

meal = 44.50
tax = 6.75 /

#16

# You're almost there! Assign the tip variable on line 5.

meal = 44.50
tax = 0.0675
tip = 15.0 /

#17

# Reassign meal on line !

meal = 44.50
tax = 0.0675
tip = 0.15 meal = meal + meal*tax

#18

# Assign the variable total on line !

meal = 44.50
tax = 0.0675
tip = 0.15 meal = meal + meal * tax
total = meal + meal * tip print("%.2f" % total)

#19

# Set the variable brian on line !
brian = "Hello life!"

#20

# Assign your variables below, each on its own line!
caesar = "Graham"
praline = "John"
viking = "Teresa" # Put your variables above this line print caesar
print praline
print viking

#21

# The string below is broken. Fix it using the escape backslash!

'This isn\'t flying, this is falling with style!'

#22

"""
The string "PYTHON" has six characters,
numbered to , as shown below: +---+---+---+---+---+---+
| P | Y | T | H | O | N |
+---+---+---+---+---+---+ So if you wanted "Y", you could just type
"PYTHON"[] (always start counting from !)
"""
fifth_letter = "MONTY"[] print fifth_letter

#23

parrot = "Norwegian Blue"
print len(parrot)

#24

parrot = "Norwegian Blue"
print parrot.lower()

#25

parrot = "norwegian blue"
print parrot.upper()

#26

"""Declare and assign your variable on line 4,
then call your method on line !"""
pi=3.14
print str(pi)

#27

ministry = "The Ministry of Silly Walks"

print len(ministry)
print ministry.upper()

#28

"""Tell Python to print "Monty Python"
to the console on line !""" print "Monty Python"

#29

"""Assign the string "Ping!" to
the variable the_machine_goes on
line , then print it out on line !"""
the_machine_goes = "Ping!"
print the_machine_goes

#30

# Print the concatenation of "Spam and eggs" on line !
print "Spam "+"and "+"eggs"

#31

# Turn 3.14 into a string on line !

print "The value of pi is around " + str(3.14)

#32

string_1 = "Camelot"
string_2 = "place" print "Let's not go to %s. 'Tis a silly %s." % (string_1, string_2)

#33

name = raw_input("What is your name?")
quest = raw_input("What is your quest?")
color = raw_input("What is your favorite color?") print "Ah, so your name is %s, your quest is %s, " \
"and your favorite color is %s." % (name, quest, color)

#34

# Write your code below, starting on line !
my_string ="haha"
print len(my_string)
print my_string.upper()

#35

Codecademy python的更多相关文章

  1. codecademy练习记录--Learn Python(70%)

    ############################################################################### codecademy python 5. ...

  2. Python 入门【一】Python 初识及学习资料

    Python 初识及学习路线: CodeCademy Python 在线教学: 廖雪峰 Python 2.7 教程: 廖雪峰 Python 3.0 教程: Python 官方文档(2.7~3.7:英文 ...

  3. 2015/8/9 到家了,学完了CodeCademy的Python

    昨天坐了20多个小时的硬座回家.发现在网络信号差的火车上也是学习的好地方.如果你的手机电量不足的话,带上两本书简直是绝配.我在火车上阅读了两百多页的内容,并没有多大的疲累,那样无聊的环境里面能看书学习 ...

  4. Codecademy For Python学习笔记

    一.Python Lists and Dictionaries: 1. 2.

  5. 给大家推荐一个python的学习网站 http://www.codecademy.com

    注册之后,可以跟着指导,自己编码学习,比较方面: 再推荐一个在线编译的代码网站,c/c++ python  都可以: http://codepad.org

  6. 【转】Python资源 转自 dylanninin.com

    http://dylanninin.com/blog/2013/11/23/python_resource.html Python是在工作期间零零碎碎学习起来的.当时正值部门申购图书,鉴于Python ...

  7. Python学习推荐

    1.    Python官网 官网想必是最权威的,不仅有Python 2.X和3.X的软件包,还有官方文档Python tutorial (official docs)及社区. 2.    在线阅读免 ...

  8. Python抓取单个网页中所有的PDF文档

    Github博文地址,此处更新可能不是很及时. 1.背景 最近发现算法以及数据结构落下了不少(其实还是大学没怎么好好学,囧rz),考虑到最近的项目结构越来越复杂了,用它来练练思路,就打算复习下数据结构 ...

  9. 学习Python编程的11个资源

    用 Python 写代码并不难,事实上,它一直以来都是被声称为最容易学习的编程语言.如果你正打算学习 web 开发,Python 是一个不错的选择,甚至你想学游戏开发也可 以从 Python 开始,因 ...

随机推荐

  1. rsync本地及远程复制备份【原创】

    1.安装rsyncyum instsall rsync 2.本地复制 rsync -auq --progress --delete /tongbu1/ /tongbu2/ rsync -auq --p ...

  2. Linux下实现多播(组播)

    单播只能发送给一个接收方,但是当给多个接收者发送时,不仅仅耗费流量,而且耗费时间,总流量=每个接收者的流量*接受者. 广播方式是发送给所有的主机,广播的坏处是会造成信息污染,大量的信息会占用网络带宽. ...

  3. 用js面向对象思想封装插件

    js是基于原型的面向对象语言,如果你学过java,c#等正统面向对象语言,你会难以理解js的面向对象,他和普通的面向对象不太一样,今天,我们通过封装一个toast插件,来看看js面向对象是如何运行的. ...

  4. MinGW-MSYS Bundle Win32编译ffmpeg 生成DLL并加入X264模块

    组件资源站点 1)MinGW-MSYS Bundle http://sourceforge.net/projects/mingwbundle/files/ 2)yasm汇编器 http://yasm. ...

  5. 计算a+b

    输入: 1 2 结果: 3 说明:只能输入数字,两数间只有一个空格 代码如下:(vc6编译) #include <stdio.h> #include <conio.h> voi ...

  6. centos7 vnc 无法systemctl启动

    1.centos7 vnc 无法systemctl启动 报错如下:Failed to start Remote desktop service (VNC) 2.解决办法 错误服务脚本名 vncserv ...

  7. Ninject中调用webapi卡住的情况解决

    过年这两天在家做项目,把mvc升级到了5.1,webapi升级到了2.1,忽然发现一个问题,在某些页面上ajax调用webapi时会发现卡死现象,CPU也没有被占用,就是网页一些在加载也不报错,经过2 ...

  8. C/C++经典面试题

    1.指向数组的指针 和 指向数组首元素的指针 2018-03-07 昨天在牛客上看到这么一道C语言面试题,挺经典的,特来分享给大家. 程序如下,问输出结果 #include <stdio.h&g ...

  9. 使用Oracle数据库,对某个表频繁更新

    使用Oracle数据库,对某个表频繁更新,查询时要联合这张表,查询速度非常慢,有什么解决办法? 一般的pc机oracle更新的效率均可达到500+/s, 可能的问题,你更新这个不会是每次都新建jdbc ...

  10. 支持多个title,解决主副标题分别对齐