Skip to content

Instantly share code, notes, and snippets.

Avatar
🎢
Working

Jayesh Tiwari JayeshTiwari03

🎢
Working
  • India
View GitHub Profile
View Character_Input.py
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)
View Odd_Even.py
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")
View List_Less_Than_Ten.py
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)
View Divisors.py
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)
@JayeshTiwari03
JayeshTiwari03 / AgeInput.py
Created Feb 27, 2018
Python Blocks Exercises(trinket.io)
View AgeInput.py
age = input("What us your age?")
age = int(age) * int(7)
print ("Your age in dog years will be", age, "years")
View RockPaperScissorGame.py
#!/bin/python3
from random import randint
player = input("rock, paper or scissor")
print(player, "vs", end=' ')
chosen = randint(1, 3)
if chosen == 1:
@JayeshTiwari03
JayeshTiwari03 / BattleshipGame.py
Created Mar 8, 2018
Battleship game created in Codecademy Python Course
View BattleshipGame.py
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)
@JayeshTiwari03
JayeshTiwari03 / index.html
Created Jan 8, 2020
Tribute Page FCC - Lilly Singh
View index.html
<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>
View index.html
<input
type="checkbox"
onclick="toggleTheme()"
/>
View style.css
.dark {
background-color: hsl(199.2,89.8%,11.6%);
color: hsl(0,0%,94.9%);
}