This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../paper-ripple/paper-ripple.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-animated-pages/core-animated-pages.html"> | |
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html"> | |
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-down.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-up.html"> | |
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html"> | |
<polymer-element name="my-element"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [1,2,3,6,2,5,7,9,2,3,7,9,10,25,89] | |
b = [1,2,6,8,3,1,7,0,00,335,247,21,681,146] | |
a = set (a) | |
b = set (b) | |
print(a) | |
print(b) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listPal = input("Enter word: ") | |
if listPal == listPal[::-1]: | |
print("String is palindrome") | |
else: | |
print("String is not palindrome") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass,os | |
#clears screen before executing game | |
os.system('clr') | |
os.system('clear') | |
#game commmences | |
print("*"*90) | |
print ("Rock Paper Scissors Game") | |
print ("="*90) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
a = random.randint(1,9) | |
b = int(input("Enter your guess(Numbers between 1-9)")) | |
print("your guess was too high :/ Try again Next time" if b>a else "your guess was perfect" if b==a else "Your guess was too low :/ Try again Next Time") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
a = random.sample(range(100), 5) | |
b = random.sample(range(100), 9) | |
print (a) | |
print(b) | |
new = set([i for i in a if i in b]) | |
print (new) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Use the BeautifulSoup and requests Python packages to print out a list of all the article titles on the New York Times homepage. | |
import requests | |
from bs4 import BeautifulSoup | |
url = 'http://www.nytimes.com' | |
r = requests.get(url) | |
r_html = r.text | |
soup = BeautifulSoup(r_html, "lxml") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def game(cow,bull,rnum,unum): | |
rnum = random.randint(1000,9999) | |
#print (rnum) | |
unum = int(input('Enter your guess:')) | |
for i,j in zip(str(rnum),str(unum)): | |
if i==j: | |
cow = cow+1 | |
else: |
OlderNewer