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
name = str(input("Tell me your name ")) | |
age = int(input("What is your age? ")) | |
year = str((2018 - age) + 100) | |
print (name + " will be 100 years old in " + year) |
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
num = int(input("Give me a number")) | |
if num %2==0: | |
print ("Even") | |
else: | |
print ("Odd") | |
if num%4==0: | |
print ("Mult of 4") | |
else: | |
print ("Normal Number") |
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, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | |
num = int(input("Choose a number: ")) | |
new_list = [] | |
for i in a: | |
if i<num: | |
new_list.append(i) | |
print (new_list) |
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
num = int(input("Please choose a number to divide: ")) | |
listRange = list(range(1,num+1)) | |
divisorList = [] | |
for number in listRange: | |
if num % number == 0: | |
divisorList.append(number) |
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
age = input("What us your age?") | |
age = int(age) * int(7) | |
print ("Your age in dog years will be", age, "years") |
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
#!/bin/python3 | |
from random import randint | |
player = input("rock, paper or scissor") | |
print(player, "vs", end=' ') | |
chosen = randint(1, 3) | |
if chosen == 1: |
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
from random import randint | |
board = [] | |
for x in range(0, 5): | |
board.append(["O"] * 5) | |
def print_board(board): | |
for row in board: | |
print " ".join(row) |
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
<main id="main"> | |
<h1 id="title">Lilly Singh</h1> | |
<p> The woman who inspired a million women</p> | |
<figure id="img-div"> | |
<img id="image" src="https://i.ytimg.com/vi/-HHup8PkAK0/maxresdefault.jpg" alt="Lilly Singh giving a motivational speech" /> | |
<figcaption id="img-caption">Lilly Singh (IISuperwomanII) speaks at #Youth2030</figcaption> </figure> | |
<section id="tribute-info"> | |
<h3 id="headline">Here's a time line of Lilly Singh life:</h3> | |
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
<input | |
type="checkbox" | |
onclick="toggleTheme()" | |
/> |
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
.dark { | |
background-color: hsl(199.2,89.8%,11.6%); | |
color: hsl(0,0%,94.9%); | |
} |
OlderNewer