#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. aarch64_m2

    mingw32-leptonica-1.74.4-1.fc26.noarch.rpm 2017-06-12 17:20 1.0M fedora Mirroring Project mingw32-le ...

  2. 如何使用vs2012单步调试uGUI(unity3d 5.3f4)

    下载uGUI源代码 uGUI源代码地址:https://bitbucket.org/Unity-Technologies/ui 下载代码工具:tortoisehg-3.6.2-x64.msi http ...

  3. 空洞卷积(dilated Convolution) 与感受野(Receptive Field)

    一.空洞卷积 空洞卷积是是为了解决基于FCN思想的语义分割中,输出图像的size要求和输入图像的size一致而需要upsample,但由于FCN中使用pooling操作来增大感受野同时降低分辨率,导致 ...

  4. 二十、springboot之jpa开发@MappedSuperclass 注解说明

    @MappedSuperclass使用条件: 当我们进行开发项目时,我们经常会用到实体映射到数据库表的操作,此时我们经常会发现在我们需要映射的几个实体类中,有几个共同的属性,例如编号ID,创建者,创建 ...

  5. linux安装python3(已有python2.x情况下)

    参考:https://www.cnblogs.com/Guido-admirers/p/6259410.html 1.官网下载python3 cd /home/download wget https: ...

  6. Python访问MySQL(1):初步使用PyMySQL包

    Windows 10家庭中文版,MySQL 5.7.20 for Win 64,Python 3.6.4,PyMySQL 0.8.1,2018-05-08 ---- 使用Python访问MySQL数据 ...

  7. iconfont-矢量图标字体

    二.矢量图标使用 1.进入:http://www.iconfont.cn/  搜索你图标的关键字,然后将需要的图标字体加入购物车 加入购物车之后,添加到项目 2.点击查看在线连接,生成css代码,把代 ...

  8. java基础34 泛型的使用

    本文知识点(目录): 1.泛型的好处    2.泛型在集合中的常见应用(这里只用String类型举例)    3.在泛型中是不能使用基本数据类型,如果需要使用基本数据类型,那么就使用基本数据类型对应的 ...

  9. excl筛选求和

    Excel中的筛选,是一个很常用的功能.但不知道是有意还是疏忽,Excel没有直接提供在筛选后的一些统计功能,例如求和.平均值等.而由于筛选的主要功能之一就是可以方便快捷的进行变换,所普通的以直接在数 ...

  10. Linux入门(二)Shell基本命令

    上一篇讲了普通用户切换到root用户,今天补充一点,对于Debian和Ubuntu用户,安装时候只有一个普通用户注册,在需要root权限时,我们可以在普通用户模式下输入sudo这个命令运行某些相关特权 ...