0% found this document useful (0 votes)
18 views2 pages

Qwerty

Uploaded by

amoskan2345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Qwerty

Uploaded by

amoskan2345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

123z45z67zz89ilzozveczodingz

#Welcome to the Pyg Latin Translator


pyg = 'ay'
original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word[1:len(original)]
new_word= new_word + first + pyg

if len(original) > 0 and original.isalpha():


print original
print new_word
else:
print 'empty'

-----------------------------------------------------------------------------------
-----------------------------------------
#Welcome to the Cuber

def cube(number):
return number**3

def by_three(number):
if number % 3 == 0:
return True
else:
return False
print cube(3)
print by_three(3)

_____________________________________________________________________________

start_list = [5, 3, 1, 2, 4]
square_list = []

# Your code here!


for number in start_list:
square_list.append(number**2)
square_list.sort()
print square_list
start_list = [5, 3, 1, 2, 4]
square_list = []
for number in start_list:
square_list.append(number**2)
square_list.sort()
print square_list

------------------------------------------------
________________---------------------__________--------------

from datetime import datetime


now = datetime.now()
print now

from datetime import datetime


now = datetime.now()
print now
print now.year
print now.month
print now.day

from datetime import datetime


now = datetime.now()

print '%s/%s/%s %s:%s:%s' % (now.year, now.month, now.day,now.hour, now.minute,


now.second)
_____________________________________________________________________________

a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]


x = raw_input()
for a in a:

if a % x ==0:
print a
_____________________________________________________________________________

#Yes, No, Maybe So?

def clinic():
print "You've just entered the clinic!"
print "Do you take the door on the left or the right?"
answer = raw_input("Type y or n and hit 'Enter'.").lower()
if answer == "y" :
print "This is the Verbal Abuse Room, you heap of parrot droppings!"
elif answer == "n":
print "Of course this is the Argument Room, I've told you that already!"
else:
print "You didn't pick yes or no! Try again."
clinic()

clinic()

You might also like