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
# Validating input in Python 3 | |
validSymbolsInInt = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-"] | |
validSymbolsInFloat = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "."] | |
def readInt(number): | |
charCounter = 0 | |
for num in number: | |
charCounter += 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
# Detta är ett test av användning av Turtle-biblioteket | |
# i Python. Programmet låter ett valfritt antal sköldpaddor | |
# gå runt i en inhägnad, varpå de studsar vid kollision | |
# mot väggen. | |
# | |
# Några roliga strukturer är: | |
# | |
# * Hastighetens representation i vektorform | |
# | |
# * Hantering av riktningsändring i samband med |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder