Python-Pen-Pineapple-apple-Pen

# -*- coding: utf-8 -*-
"""
Program to print pineapple pen apple pen, playing with strings and lists.
@author: mathew
"""

print("PPAP Program")

p = 'pen'
a = 'apple'

P = 'pineapple'

if 'pen' in p and 'apple' in a:
ap = [a, p]

if 'pen' in p and 'pineapple' in P:
pP = [p, P]

print(ap)
print(reversed(pP))

PPAP = (pP, ap,)

print(PPAP)

print(p)
print(a)
print(a,p)

print(p)
print(P)
print(P,p)

print(p,P,a,p)

print(a,p)
print(p,P)

print(p,P,a,p)

for string in reversed(ap):
print(string)

for string in Pp:
print(string)

for string in reversed(ap):
print(string, end='')

for string in Pp:
print(string, end='')

Thanks to Kelsey Ellison for introducing me to this earworm.

ペンパイナッポーアッポーペン

What does Brexit mean?

The first thing that Teresa May wanted to make clear on becoming the Prime Minister of the UK, was that “Brexit means Brexit”. (e.g. Link to video). She has repeated this whenever asked about Brexit. During the G20 summit in Hangzhou China, she further explained in a press conference, “The reason I’ve been saying Brexit means Brexit is precisely because it means it does”.

To help anyone who still isn’t sure about what Brexit means I have written a computer program to illuminate you.

The output of the program is as follows:

Want to know what Brexit means?
y/n:y
‘Brexit’ means Brexit

Want to know what ‘Brexit’ means Brexit means?
y/n:y
”Brexit’ means Brexit’ means ‘Brexit’ means Brexit

Want to know what ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit means?
y/n:y
”’Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit

Want to know what ”’Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit means?
y/n:y
””Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”’Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit

Want to know what ””Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”’Brexit’ means Brexit’ means ‘Brexit’ means Brexit’ means ”Brexit’ means Brexit’ means ‘Brexit’ means Brexit means?
y/n:

The code in Python3 is as follows:

# -*- coding: utf-8 -*-
"""
Created on Sun Sep 18 14:24:10 2016

Program to show what Brexit means.

@author: Mathew Peet
“””

str=”Brexit”
iWantToKnow = True

while iWantToKnow == True:
print(“Want to know what”,str,” means?”)
ans=input(“y/n:”)
ans = ans.lower()
if ans==’y’ or ans==’yes’:
str=”‘”+str+”‘”+’ means ‘+str
print(str,’\n\n’)
else:
iWantToKnow=False

 

screenshot-from-2016-09-18-154012