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
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)] |
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
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 |
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/bash | |
if [ "$#" -eq 0 ] | |
then | |
cd "$(dirname ${BASH_SOURCE[0]})" | |
ls | sort | run-parts | |
fi | |
if [ $1 ! 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 fractions import Fraction | |
def integer(first): | |
while first is int: | |
return True | |
def fraction(second): |
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 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)) |
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
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(" ") |
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
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) |
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
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) |
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 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(",") |
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
def main(): | |
while True: | |
try: | |
input(int("please enter the with of the gameboard :" ) | |
except ValueError: | |
print("please stop being an idiot") | |
OlderNewer