Skip to content

Instantly share code, notes, and snippets.

while True:
original = input("Enter a word: ")
stop = ['.']
if original == '.':
break
pyg = ('ay')
word=original.lower()
first= word[0]
new_word = word + first + pyg
new_word= new_word[1:len(new_word)]
while True: #af einhverjum ástæðum krafa til að hægt sé að keyra í hringi
user_input = input("Enter a word: ")
if user_input == '.': #skilgreinir hvaða input er æskilegt til að brjóra hringkeyrslu
break
vowels = ['a','e','i','o','u'] #skilgreinir mögulega sérhljóða.
def translate(user_input):
first = user_input[0] #lætur leita í fyrsta stafnum
global index_value # gerir index valiue að fasta í öllu forritinu í staðin fyrir "local fasta"... ekki vinsælt
#!/bin/bash
if [ "$#" -eq 0 ]
then
cd "$(dirname ${BASH_SOURCE[0]})"
ls | sort | run-parts
fi
if [ $1 ! 1 ]
from fractions import Fraction
def integer(first):
while first is int:
return True
def fraction(second):
@gunnarig
gunnarig / ppp.py
Created September 24, 2018 14:26
from fractions import Fraction
# shares price
def sharesXprice(stock,valiue):
result = stock*valiue
divide = valiue % 1
dollar = int(valiue)
print("{0} shares with market price {1} {2} have valiue ${3}".format(shares,dollar,divide,result))
def get_word_string(user_file):
user_file = open(user_file,"r")
list_of = []
wordString = '' # start with an empty string of words
for line in user_file:
line.split()
wordString += line # add each line of words to the word string
rejoin = list_of.append(wordString)
#remove = rejoin.replace(", ","").replace("\n"," ")
#list_it = remove.split(" ")
def get_word_string(user_file):
user_file = open(user_file,"r")
states = []
#wordString = '' # start with an empty string of words
lines = user_file.readlines()
header = lines[0].split(",")
for line in lines[0:]:
items = line.split("\n")
states.append(items)
#print(states)
def get_word_string(user_file):
user_file = open(user_file,"r")
states = []
#wordString = '' # start with an empty string of words
lines = user_file.readlines()
header = lines[0].split(",")
for line in lines[0:]:
items = line.split("\n")
states.append(items)
#print(states)
import string
from itertools import cycle
def get_word_string(user_file):
user_file = open(user_file,"r")
states = []
#wordString = '' # start with an empty string of words
lines = user_file.readlines()
header = lines[0].split(",")
def main():
while True:
try:
input(int("please enter the with of the gameboard :" )
except ValueError:
print("please stop being an idiot")