Format
There really is no hope of making this code even half-way decent without spending the time to rewrite them all properly. Don't want to do any of that
This commit is contained in:
276
.clang-format
Normal file
276
.clang-format
Normal file
@@ -0,0 +1,276 @@
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
# ╭─────────────────────────────────────────────────╮
|
||||
# │ clang-format config │
|
||||
# ╰─────────────────────────────────────────────────╯
|
||||
# ─────────────────────────────────────────────────────────────────────
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: BlockIndent
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCaseArrows: false
|
||||
AlignCaseColons: false
|
||||
AlignConsecutiveTableGenBreakingDAGArgColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenCondOperatorColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenDefinitionColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseExpressionOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AttributeMacros:
|
||||
- __capability
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Always
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakAfterReturnType: None
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: All
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakFunctionDefinitionParameters: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
BreakTemplateDeclarations: MultiLine
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: "^ IWYU pragma:"
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: true
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: ^"(llvm|llvm-c|clang|clang-c)/
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: ^(<|"(gtest|gmock|isl|json)/)
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: .*
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: (Test)?$
|
||||
IncludeIsMainSourceRegex: ""
|
||||
IndentAccessModifiers: true
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: BeforeHash
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLines:
|
||||
AtEndOfFile: false
|
||||
AtStartOfBlock: true
|
||||
AtStartOfFile: true
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ""
|
||||
MacroBlockEnd: ""
|
||||
MainIncludeChar: Quote
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PPIndentWidth: -1
|
||||
PackConstructorInitializers: BinPack
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakScopeResolution: 500
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
QualifierAlignment: Left
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: true
|
||||
RemoveBracesLLVM: true
|
||||
RemoveParentheses: MultipleParentheses
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Always
|
||||
ShortNamespaceLines: 1
|
||||
SkipMacroDefinitionBody: false
|
||||
SortIncludes: CaseSensitive
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: true
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterForeachMacros: true
|
||||
AfterFunctionDeclarationName: true
|
||||
AfterFunctionDefinitionName: true
|
||||
AfterIfMacros: true
|
||||
AfterOverloadedOperator: false
|
||||
AfterPlacementOperator: true
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Custom
|
||||
SpacesInParensOptions:
|
||||
ExceptDoubleParentheses: false
|
||||
InConditionalStatements: true
|
||||
InCStyleCasts: false
|
||||
InEmptyParentheses: false
|
||||
Other: true
|
||||
SpacesInSquareBrackets: true
|
||||
Standard: Latest
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TabWidth: 4
|
||||
TableGenBreakInsideDAGArg: DontBreak
|
||||
UseTab: Never
|
||||
VerilogBreakBetweenInstancePorts: true
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
@@ -6,11 +6,13 @@ turtle.setup(500,500)
|
||||
turtle.speed(0)
|
||||
turtle.width(4)
|
||||
|
||||
|
||||
def quadrat():
|
||||
for i in range(4):
|
||||
turtle.fd(100)
|
||||
turtle.rt(90)
|
||||
|
||||
|
||||
turtle.pu()
|
||||
turtle.setpos(-350, -50)
|
||||
turtle.pd()
|
||||
@@ -24,4 +26,3 @@ while True:
|
||||
turtle.fd(1)
|
||||
time.sleep(0.01)
|
||||
turtle.update()
|
||||
|
||||
|
||||
@@ -23,4 +23,3 @@ while True:
|
||||
turtle.dot(50)
|
||||
turtle.fd(0.5)
|
||||
turtle.update()
|
||||
|
||||
@@ -5,6 +5,7 @@ import math
|
||||
|
||||
speed_boat = 0.01
|
||||
|
||||
|
||||
def ship():
|
||||
clear()
|
||||
fd(130)
|
||||
@@ -27,6 +28,7 @@ def ship():
|
||||
lt(50)
|
||||
update()
|
||||
|
||||
|
||||
def ship_2():
|
||||
clear()
|
||||
fd(130)
|
||||
@@ -37,8 +39,6 @@ def ship_2():
|
||||
rt(130)
|
||||
|
||||
|
||||
|
||||
|
||||
def speed_more():
|
||||
global speed_boat
|
||||
speed_boat += 0.5
|
||||
@@ -58,18 +58,22 @@ def speed_less():
|
||||
global speed_boat
|
||||
speed_boat -= 0.5
|
||||
|
||||
|
||||
def speed_stop():
|
||||
global speed_boat
|
||||
speed_boat = -1.35
|
||||
|
||||
|
||||
def speed_exelerate_fast():
|
||||
global speed_boat
|
||||
speed_boat += 2
|
||||
|
||||
|
||||
def speed_reduce_fast():
|
||||
global speed_boat
|
||||
speed_boat -= 2
|
||||
|
||||
|
||||
def reset_system():
|
||||
global speed_boat
|
||||
speed_boat = 0.01
|
||||
@@ -81,8 +85,6 @@ def reset_system():
|
||||
ht()
|
||||
|
||||
|
||||
|
||||
|
||||
reset_system()
|
||||
|
||||
while True:
|
||||
@@ -98,4 +100,3 @@ while True:
|
||||
onkeypress(goleft, "Left")
|
||||
onkeypress(speed_less, "Down")
|
||||
listen()
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ turtle.addshape("sun.gif")
|
||||
earth.shape("earth.gif")
|
||||
sun.shape("sun.gif")
|
||||
|
||||
|
||||
# Erde umkreist Sonne
|
||||
def earth_move():
|
||||
for i in range(10):
|
||||
@@ -29,4 +30,3 @@ earth.rt(90)
|
||||
|
||||
while True:
|
||||
earth_move()
|
||||
|
||||
@@ -8,6 +8,7 @@ title("Main Hub")
|
||||
|
||||
# Wichtige Vorbereitungen
|
||||
|
||||
|
||||
def hi():
|
||||
pu()
|
||||
setpos(-100, 0)
|
||||
@@ -25,27 +26,56 @@ def hi():
|
||||
pd()
|
||||
fd(200)
|
||||
|
||||
|
||||
speed(10000)
|
||||
ht()
|
||||
|
||||
# Lässt den Benutzer auswählen, ob die Formen zufällig oder in einem Kreis angeordnet, nach Wünschen des Benutzers gezeichnet werden sollen.
|
||||
print("ready")
|
||||
hi()
|
||||
program_choice = int(numinput("Welches Program sollte ausgeführt werden?", " 1=Custom, 2=Random, 3=Drunken Man ",1,minval=1))
|
||||
program_choice = int(
|
||||
numinput(
|
||||
"Welches Program sollte ausgeführt werden?",
|
||||
" 1=Custom, 2=Random, 3=Drunken Man ",
|
||||
1,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# Definition des Befehls Vieleck(). Der Grundbaustein des Programms
|
||||
def vieleck(anzahl_seiten,radius, anzahl_kreis_printed, figuren, kreise, figur_nummer, save_first):
|
||||
def vieleck(
|
||||
anzahl_seiten,
|
||||
radius,
|
||||
anzahl_kreis_printed,
|
||||
figuren,
|
||||
kreise,
|
||||
figur_nummer,
|
||||
save_first,
|
||||
):
|
||||
parts_circle = 1
|
||||
time_durchgang_start = time.time()
|
||||
for i in range(anzahl_seiten):
|
||||
fd(radius / anzahl_seiten)
|
||||
rt(360 / anzahl_seiten)
|
||||
parts_circle += 1
|
||||
if parts_circle / anzahl_seiten * 100 >= 50 and parts_circle / anzahl_seiten * 100 < 50.1:
|
||||
if (
|
||||
parts_circle / anzahl_seiten * 100 >= 50
|
||||
and parts_circle / anzahl_seiten * 100 < 50.1
|
||||
):
|
||||
print(" Circle:", parts_circle / anzahl_seiten * 100, "%")
|
||||
time_durchgang_end = time.time()
|
||||
exact_timecalculation(time_durchgang_start, time_durchgang_end, anzahl_seiten, radius, anzahl_kreis_printed, figuren, kreise, figur_nummer, save_first)
|
||||
exact_timecalculation(
|
||||
time_durchgang_start,
|
||||
time_durchgang_end,
|
||||
anzahl_seiten,
|
||||
radius,
|
||||
anzahl_kreis_printed,
|
||||
figuren,
|
||||
kreise,
|
||||
figur_nummer,
|
||||
save_first,
|
||||
)
|
||||
|
||||
|
||||
# Definition des Befehls, der mit beendigung des Auswahlverfahrens aufgerufen wird. Verwaltet die wichtigsten feautures
|
||||
@@ -58,7 +88,15 @@ def figur(seite,radiusin,anzahlkr,anzahl_figuren,erh_input):
|
||||
print("drawing figure number", figur_number)
|
||||
anzahl_kr_printed = 0
|
||||
for i in range(anzahlkr):
|
||||
vieleck(seite,radiusin, anzahl_kr_printed, anzahl_figuren, anzahlkr, figur_number, first_time)
|
||||
vieleck(
|
||||
seite,
|
||||
radiusin,
|
||||
anzahl_kr_printed,
|
||||
anzahl_figuren,
|
||||
anzahlkr,
|
||||
figur_number,
|
||||
first_time,
|
||||
)
|
||||
rt(360 / anzahlkr)
|
||||
anzahl_kr_printed += 1
|
||||
print(anzahl_kr_printed / anzahlkr * 100, "%")
|
||||
@@ -67,12 +105,34 @@ def figur(seite,radiusin,anzahlkr,anzahl_figuren,erh_input):
|
||||
print("done")
|
||||
print("Globally:", (figur_number - 1) / anzahl_figuren * 100, "% done")
|
||||
|
||||
|
||||
# Berechnet, sobald das Programm begonnen hatte zu zeichnen, wie lange der Vorgang noch dauern wird.
|
||||
def exact_timecalculation(time_durchgang_end_1, time_durchgang_start_1, seitenzahl, radiusinput, anzahl_kreise_printed, figuren, kreise, figur_number, save_1):
|
||||
def exact_timecalculation(
|
||||
time_durchgang_end_1,
|
||||
time_durchgang_start_1,
|
||||
seitenzahl,
|
||||
radiusinput,
|
||||
anzahl_kreise_printed,
|
||||
figuren,
|
||||
kreise,
|
||||
figur_number,
|
||||
save_1,
|
||||
):
|
||||
print("Time per shape", time_durchgang_start_1 - time_durchgang_end_1)
|
||||
remaining_circles = (figuren * kreise) - ((anzahl_kreise_printed + ((figur_number - 1) * kreise)))
|
||||
remaining_time = remaining_circles * ((time_durchgang_end_1 - time_durchgang_start_1) * -1)
|
||||
print(((anzahl_kreise_printed + ((figur_number - 1) * kreise))), "/", (kreise * figuren), "shapes got already printed.", remaining_circles, "remaining")
|
||||
remaining_circles = (figuren * kreise) - (
|
||||
(anzahl_kreise_printed + ((figur_number - 1) * kreise))
|
||||
)
|
||||
remaining_time = remaining_circles * (
|
||||
(time_durchgang_end_1 - time_durchgang_start_1) * -1
|
||||
)
|
||||
print(
|
||||
((anzahl_kreise_printed + ((figur_number - 1) * kreise))),
|
||||
"/",
|
||||
(kreise * figuren),
|
||||
"shapes got already printed.",
|
||||
remaining_circles,
|
||||
"remaining",
|
||||
)
|
||||
print("ETA:", remaining_time, "seconds or", remaining_time / 60, "minutes")
|
||||
if save_1 > 1:
|
||||
remaining_time = save_time_end
|
||||
@@ -80,6 +140,7 @@ def exact_timecalculation(time_durchgang_end_1, time_durchgang_start_1, seitenza
|
||||
else:
|
||||
save_1 = 0
|
||||
|
||||
|
||||
# Wechselt die Farbe
|
||||
def change_color(anz_figuren):
|
||||
if anz_figuren >= 1 and anz_figuren < 2:
|
||||
@@ -102,7 +163,12 @@ def vieleck_random_randomize():
|
||||
amount_circles_drawn = 0
|
||||
pu()
|
||||
amount_circles = random.randint(25, 75)
|
||||
print(amount_circles, "shapes need to be printed. Esitmated time:", amount_circles * 0.35, "seconds")
|
||||
print(
|
||||
amount_circles,
|
||||
"shapes need to be printed. Esitmated time:",
|
||||
amount_circles * 0.35,
|
||||
"seconds",
|
||||
)
|
||||
print("0 / 0 or 0 % done")
|
||||
for i in range(amount_circles):
|
||||
color(random.random(), random.random(), random.random())
|
||||
@@ -124,17 +190,32 @@ def vieleck_random_randomize():
|
||||
rt(360 / ecken)
|
||||
amount_circles_drawn += 1
|
||||
pu()
|
||||
print(amount_circles_drawn, "/", amount_circles, "or", amount_circles_drawn / amount_circles * 100, "% drawn.")
|
||||
print(
|
||||
amount_circles_drawn,
|
||||
"/",
|
||||
amount_circles,
|
||||
"or",
|
||||
amount_circles_drawn / amount_circles * 100,
|
||||
"% drawn.",
|
||||
)
|
||||
print("100 % done. Process ended with a 0")
|
||||
|
||||
|
||||
# Definition des Betrunkenen Mannes??
|
||||
def drunken_man_walk_show(schritte, distanz):
|
||||
for i in range(schritte):
|
||||
fd(distanz)
|
||||
setheading(random.randint(0, 360))
|
||||
|
||||
def drunken_man_walk_calculate(anzahl_tests,anzahl_figuren_test,add,anzahl_tests_pro,ausgabe):
|
||||
print("started. Going to make the test", anzahl_tests, "times to get a result which is as acurate as possible")
|
||||
|
||||
def drunken_man_walk_calculate(
|
||||
anzahl_tests, anzahl_figuren_test, add, anzahl_tests_pro, ausgabe
|
||||
):
|
||||
print(
|
||||
"started. Going to make the test",
|
||||
anzahl_tests,
|
||||
"times to get a result which is as acurate as possible",
|
||||
)
|
||||
schritte = 100
|
||||
schritte_begin = schritte
|
||||
distanz = 20
|
||||
@@ -144,7 +225,14 @@ def drunken_man_walk_calculate(anzahl_tests,anzahl_figuren_test,add,anzahl_tests
|
||||
for i in range(anzahl_figuren_test):
|
||||
amount_atemps_per = 0
|
||||
for i in range(anzahl_tests):
|
||||
print("Collecting data for", schritte,"steps, collecting data for try number", amount_atemps_per + 1, "/", anzahl_tests)
|
||||
print(
|
||||
"Collecting data for",
|
||||
schritte,
|
||||
"steps, collecting data for try number",
|
||||
amount_atemps_per + 1,
|
||||
"/",
|
||||
anzahl_tests,
|
||||
)
|
||||
for i in range(anzahl_tests_pro):
|
||||
drunken_man_walk_show(schritte, distanz)
|
||||
x = xcor()
|
||||
@@ -155,12 +243,24 @@ def drunken_man_walk_calculate(anzahl_tests,anzahl_figuren_test,add,anzahl_tests
|
||||
home()
|
||||
pd()
|
||||
summe_calc = summe / anzahl_tests_pro
|
||||
print("Average dislocation of 0.0 is:", summe_calc,"pixels, with a amount of steps of", schritte,".")
|
||||
print(
|
||||
"Average dislocation of 0.0 is:",
|
||||
summe_calc,
|
||||
"pixels, with a amount of steps of",
|
||||
schritte,
|
||||
".",
|
||||
)
|
||||
summe_second += summe_calc
|
||||
reset()
|
||||
summe = 0
|
||||
amount_atemps_per += 1
|
||||
print("TOTAL Average dislocation of 0.0 is:", summe_second / anzahl_tests, "pixels with", schritte, "steps")
|
||||
print(
|
||||
"TOTAL Average dislocation of 0.0 is:",
|
||||
summe_second / anzahl_tests,
|
||||
"pixels with",
|
||||
schritte,
|
||||
"steps",
|
||||
)
|
||||
print("Next size getting executed")
|
||||
result = summe_second / anzahl_tests
|
||||
l.append(result)
|
||||
@@ -185,8 +285,6 @@ def drunken_man_walk_calculate(anzahl_tests,anzahl_figuren_test,add,anzahl_tests
|
||||
schritte_begin += add
|
||||
|
||||
|
||||
|
||||
|
||||
# Wird ausgeführt, wenn der vom Benutzer einstellbare Modus ausgewählt wird.
|
||||
if program_choice >= 1 and program_choice < 2:
|
||||
title("Custom Design")
|
||||
@@ -194,21 +292,83 @@ if program_choice >= 1 and program_choice < 2:
|
||||
ht()
|
||||
speed(10000)
|
||||
print("Custom Design")
|
||||
seiteninput = int(numinput("Wie viele Seiten?", " Gerade Zahl von 3-unendlich ",10,minval=3))
|
||||
radiusinput = int(numinput("Wie gross soll der Radius sein?", " Gerade Zahl von 50-unendlich ",50,minval=50))
|
||||
anzahlkrinput = int(numinput("Wie viele Kreise sollen gezeichnet werden??", " Gerade Zahl von 1-unendlich ",5,minval=1))
|
||||
figureninput = int(numinput("Wie viele Figuren sollen gezeichnet werden?", " Gerade Zahl von 1-unendlich ",5,minval=1))
|
||||
erhinput = int(numinput("Um wieviel soll sich sich der Radius der Kreise erhöhen?", " Gerade Zahl von 20-unendlich ",50,minval=20))
|
||||
verzoegerung = int(numinput("Wie schnell soll die Animation laufen?", " Gerade Zahl von 1-unendlich, umso höher, desto schneller ",50,minval=0))
|
||||
seiteninput = int(
|
||||
numinput(
|
||||
"Wie viele Seiten?", " Gerade Zahl von 3-unendlich ", 10, minval=3
|
||||
)
|
||||
)
|
||||
radiusinput = int(
|
||||
numinput(
|
||||
"Wie gross soll der Radius sein?",
|
||||
" Gerade Zahl von 50-unendlich ",
|
||||
50,
|
||||
minval=50,
|
||||
)
|
||||
)
|
||||
anzahlkrinput = int(
|
||||
numinput(
|
||||
"Wie viele Kreise sollen gezeichnet werden??",
|
||||
" Gerade Zahl von 1-unendlich ",
|
||||
5,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
figureninput = int(
|
||||
numinput(
|
||||
"Wie viele Figuren sollen gezeichnet werden?",
|
||||
" Gerade Zahl von 1-unendlich ",
|
||||
5,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
erhinput = int(
|
||||
numinput(
|
||||
"Um wieviel soll sich sich der Radius der Kreise erhöhen?",
|
||||
" Gerade Zahl von 20-unendlich ",
|
||||
50,
|
||||
minval=20,
|
||||
)
|
||||
)
|
||||
verzoegerung = int(
|
||||
numinput(
|
||||
"Wie schnell soll die Animation laufen?",
|
||||
" Gerade Zahl von 1-unendlich, umso höher, desto schneller ",
|
||||
50,
|
||||
minval=0,
|
||||
)
|
||||
)
|
||||
print("starting process...")
|
||||
tracer(verzoegerung)
|
||||
print(anzahlkrinput * figureninput, "circles need to be printed. Estimated time until completion:", (anzahlkrinput * figureninput * (seiteninput * 0.0330383)), "seconds or", (anzahlkrinput * figureninput * (seiteninput * 0.0330383)) / 60, "minutes")
|
||||
print(
|
||||
anzahlkrinput * figureninput,
|
||||
"circles need to be printed. Estimated time until completion:",
|
||||
(anzahlkrinput * figureninput * (seiteninput * 0.0330383)),
|
||||
"seconds or",
|
||||
(anzahlkrinput * figureninput * (seiteninput * 0.0330383)) / 60,
|
||||
"minutes",
|
||||
)
|
||||
time.sleep(2)
|
||||
draw_time_start = time.time()
|
||||
figur(seiteninput, radiusinput, anzahlkrinput, figureninput, erhinput)
|
||||
draw_time_end = time.time()
|
||||
draw_time = (draw_time_end - draw_time_start) - (anzahlkrinput * figureninput * (seiteninput * 0.0330383))
|
||||
print("Drawing of", anzahlkrinput * figureninput, "shapes has taken", draw_time_end - draw_time_start , "seconds or", (draw_time_end - draw_time_start) / 60, "minutes, estimated:", (anzahlkrinput * figureninput * (seiteninput * 0.0330383)), "seconds, which means a diffrence of", draw_time, "seconds or missed by", draw_time * 100, "%")
|
||||
draw_time = (draw_time_end - draw_time_start) - (
|
||||
anzahlkrinput * figureninput * (seiteninput * 0.0330383)
|
||||
)
|
||||
print(
|
||||
"Drawing of",
|
||||
anzahlkrinput * figureninput,
|
||||
"shapes has taken",
|
||||
draw_time_end - draw_time_start,
|
||||
"seconds or",
|
||||
(draw_time_end - draw_time_start) / 60,
|
||||
"minutes, estimated:",
|
||||
(anzahlkrinput * figureninput * (seiteninput * 0.0330383)),
|
||||
"seconds, which means a diffrence of",
|
||||
draw_time,
|
||||
"seconds or missed by",
|
||||
draw_time * 100,
|
||||
"%",
|
||||
)
|
||||
print("Click to exit")
|
||||
|
||||
|
||||
@@ -231,20 +391,72 @@ else:
|
||||
ht()
|
||||
speed(0)
|
||||
print("Drunken Man's Walk")
|
||||
easy_difficult = int(numinput("Soll es gezeigt oder eine Tabelle erstellt werden?", " 1=Normal, 2=Tabelle ",1,minval=1))
|
||||
easy_difficult = int(
|
||||
numinput(
|
||||
"Soll es gezeigt oder eine Tabelle erstellt werden?",
|
||||
" 1=Normal, 2=Tabelle ",
|
||||
1,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
if easy_difficult == 1:
|
||||
title("Drunken Man's Walk: standard")
|
||||
drunken_man_walk_show(100, 20)
|
||||
else:
|
||||
title("Drunken Man's Walk: List")
|
||||
tests_total = int(numinput("Wie viele unterschiedliche Längen sollten getestet werden?", " Dauer erhöht sich extrem, Genauigkeit genauso ",10,minval=1))
|
||||
tests_per = int(numinput("Wieviele Tests sollten pro Länge durchgeführt werden?", " Dauer erhöht sich extrem, Genauigkeit genauso ",10,minval=1))
|
||||
addition = int(numinput("Um wieviel soll die Schrittzahl vergrössert werden?", " Dauer erhöht sich unbedeutend, abhängig von Tests ", 100, minval=1))
|
||||
executes_per = int(numinput("Wie viele Spuren sollen gezeichnet werden?", " Dauer erhöht sich ziemlich, Genauigkeit genauso ",1000,minval=1))
|
||||
tracerdelay = int(numinput("Alle wie viele Striche soll aktualisiert werden?", " umso höher, desto schneller ",10000,minval=1))
|
||||
output = int(numinput("Wie soll die Liste ausgegeben werden?", " 1 = Liste, 2 = Tabelle ",1,minval=1, maxval=2))
|
||||
tests_total = int(
|
||||
numinput(
|
||||
"Wie viele unterschiedliche Längen sollten getestet werden?",
|
||||
" Dauer erhöht sich extrem, Genauigkeit genauso ",
|
||||
10,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
tests_per = int(
|
||||
numinput(
|
||||
"Wieviele Tests sollten pro Länge durchgeführt werden?",
|
||||
" Dauer erhöht sich extrem, Genauigkeit genauso ",
|
||||
10,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
addition = int(
|
||||
numinput(
|
||||
"Um wieviel soll die Schrittzahl vergrössert werden?",
|
||||
" Dauer erhöht sich unbedeutend, abhängig von Tests ",
|
||||
100,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
executes_per = int(
|
||||
numinput(
|
||||
"Wie viele Spuren sollen gezeichnet werden?",
|
||||
" Dauer erhöht sich ziemlich, Genauigkeit genauso ",
|
||||
1000,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
tracerdelay = int(
|
||||
numinput(
|
||||
"Alle wie viele Striche soll aktualisiert werden?",
|
||||
" umso höher, desto schneller ",
|
||||
10000,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
output = int(
|
||||
numinput(
|
||||
"Wie soll die Liste ausgegeben werden?",
|
||||
" 1 = Liste, 2 = Tabelle ",
|
||||
1,
|
||||
minval=1,
|
||||
maxval=2,
|
||||
)
|
||||
)
|
||||
tracer(tracerdelay)
|
||||
drunken_man_walk_calculate(tests_per,tests_total,addition,executes_per,output)
|
||||
drunken_man_walk_calculate(
|
||||
tests_per, tests_total, addition, executes_per, output
|
||||
)
|
||||
|
||||
else:
|
||||
print("wrong")
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
from turtle import *
|
||||
import time
|
||||
|
||||
# tracer(1)
|
||||
# ht()
|
||||
|
||||
|
||||
def viereck():
|
||||
for i in range(1000000000000000):
|
||||
clear()
|
||||
@@ -18,4 +20,5 @@ def viereck():
|
||||
fd(50)
|
||||
time.sleep(0.05)
|
||||
|
||||
|
||||
viereck()
|
||||
@@ -19,6 +19,6 @@ while True:
|
||||
else:
|
||||
print("\t/", end="\r")
|
||||
time.sleep(0.5)
|
||||
os.system( 'clear' )
|
||||
os.system("clear")
|
||||
strich += 1
|
||||
strich = 1
|
||||
@@ -1,7 +1,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int summe = 0;
|
||||
for ( int i = 0; i < 5; i++ ) {
|
||||
printf("Gib die Zahl ein:")
|
||||
printf( "Gib die Zahl ein:" );
|
||||
int zahl;
|
||||
scanf( "%d", &zahl );
|
||||
summe = summe + zahl;
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
vector<string> msg { "Hello", "C++", "World", "from", "VS Code", "and the C++ extension!" };
|
||||
|
||||
for ( const string &word : msg )
|
||||
{
|
||||
cout << word << " ";
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
// Deklaration der Variablen
|
||||
int hist[ 26 ] = {};
|
||||
int i, k, c, count;
|
||||
@@ -21,10 +20,9 @@ int main()
|
||||
printf( "\n" );
|
||||
for ( i = 0; i < 26; i++ ) {
|
||||
count = hist[ i ];
|
||||
if (count > 0) {
|
||||
if ( count > 0 )
|
||||
printf( "%c : %f\n", i + 97, ( count / (float) num ) * 100 );
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int main() {
|
||||
// Deklaration der Variablen
|
||||
int hist[ 26 ] = {};
|
||||
int i, k, c, count;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from turtle import *
|
||||
|
||||
shape("turtle")
|
||||
color("blue")
|
||||
|
||||
|
||||
@@ -5,7 +5,14 @@ rt(45)
|
||||
go = 1
|
||||
color("red")
|
||||
|
||||
distance_in = int(numinput("Wie weit darf sich die Turtle vom Mittelpunkt entfernen??", " Gerade Zahl von 1-unendlich ",300,minval=1))
|
||||
distance_in = int(
|
||||
numinput(
|
||||
"Wie weit darf sich die Turtle vom Mittelpunkt entfernen??",
|
||||
" Gerade Zahl von 1-unendlich ",
|
||||
300,
|
||||
minval=1,
|
||||
)
|
||||
)
|
||||
|
||||
for i in range(4):
|
||||
go = 1
|
||||
|
||||
@@ -4,7 +4,8 @@ import math
|
||||
|
||||
# Startup
|
||||
out = 0
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
,--------. ,--. ,--.
|
||||
'--. .--',--,--. ,---. ,---.| ,---. ,---. ,--,--, ,--.--. ,---. ,---.| ,---. ,--,--, ,---. ,--.--.
|
||||
@@ -17,7 +18,8 @@ print("""
|
||||
Build 1
|
||||
28.05.21
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
# Userinput
|
||||
i = input("Rechung eingeben: ")
|
||||
|
||||
@@ -16,6 +16,3 @@ elif system == 8:
|
||||
|
||||
else:
|
||||
print("wrong")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,17 +8,19 @@
|
||||
# Definition of Turtle instances
|
||||
|
||||
|
||||
|
||||
# Preparations, so setup of the game output window and choice of diffrent gamemodes
|
||||
programchoice = 200
|
||||
while (programchoice < 1) or (programchoice > 99):
|
||||
programchoice = programchoice = int(input("Welcher Modus? 1 = Normales Spiel, 2 = Liste aller Gewinne mit angabe des Höchsten, 3 = angabe des höchsten Gewinnes, 4 = andgabe des höchsten erreichbaren Feldes: "))
|
||||
programchoice = programchoice = int(
|
||||
input(
|
||||
"Welcher Modus? 1 = Normales Spiel, 2 = Liste aller Gewinne mit angabe des Höchsten, 3 = angabe des höchsten Gewinnes, 4 = andgabe des höchsten erreichbaren Feldes: "
|
||||
)
|
||||
)
|
||||
if (programchoice < 1) or (programchoice > 99):
|
||||
print("Number not within designated range. Try again")
|
||||
print("Willkommen")
|
||||
|
||||
|
||||
|
||||
# MAINGAME
|
||||
# -----------------------
|
||||
def playgame(field):
|
||||
@@ -34,6 +36,7 @@ def playgame(field):
|
||||
winning += next
|
||||
field = next
|
||||
|
||||
|
||||
# GAMEMODE 1
|
||||
# -------------------------
|
||||
def gamemode1():
|
||||
@@ -58,6 +61,7 @@ def gamemode2():
|
||||
print("You win", winning, "with startpoint", fieldascending)
|
||||
fieldascending += 1
|
||||
|
||||
|
||||
# GAMEMODE 3
|
||||
# --------------------------
|
||||
def gamemode3():
|
||||
@@ -73,6 +77,7 @@ def gamemode3():
|
||||
fieldascending += 1
|
||||
print("Biggest possible winning is", currentwinning, "on field", currentfield)
|
||||
|
||||
|
||||
# GAMEMODE 4
|
||||
# -----------------------------
|
||||
def gamemode4():
|
||||
@@ -96,6 +101,7 @@ def gamemode4():
|
||||
fieldascending += 1
|
||||
print("Biggest possible field is", biggestfield, "on startfield", currentfield)
|
||||
|
||||
|
||||
# RUN
|
||||
# -------------------------
|
||||
if programchoice == 1:
|
||||
|
||||
@@ -22,13 +22,13 @@ for i in range(100):
|
||||
print(output)
|
||||
|
||||
|
||||
#Summ up
|
||||
summ = 0
|
||||
# Sum up
|
||||
sum = 0
|
||||
for i in range(100):
|
||||
n = random.randint(1, 1000)
|
||||
summ += n
|
||||
sum += n
|
||||
|
||||
print(summ)
|
||||
print(sum)
|
||||
|
||||
|
||||
# even or uneven?
|
||||
|
||||
@@ -7,7 +7,3 @@ s = int(input("Seitenlänge: "))
|
||||
# Verarbeitung
|
||||
for i in range(s):
|
||||
print(s * "* ")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ stelle = 1
|
||||
while y > 0:
|
||||
y = y // system
|
||||
outadd = y % system
|
||||
out += (outadd * stelle)
|
||||
out += outadd * stelle
|
||||
stelle *= 10
|
||||
|
||||
|
||||
|
||||
@@ -4,3 +4,5 @@ All project files of GLF Informatik at KSWO (bad, but mostly working code)
|
||||
|
||||
# Contents
|
||||
This repo contains all the code that was used in the Computer Science basics course @KSWO. Use at your own risk :)... I wasn't even remotely at the level I am at now when it comes to coding!
|
||||
|
||||
***Please!!!*** Do as as I say (do not put any umlaut or any other kind of non-ascii BS or spaces into filenames), not as I did
|
||||
|
||||
@@ -13,6 +13,7 @@ sekundenzeiger.color("red")
|
||||
minutenzeiger.color("blue")
|
||||
stundenzeiger.width(2)
|
||||
|
||||
|
||||
# Definition des Ziffernblattes
|
||||
def clock_bg():
|
||||
uhr.pd()
|
||||
@@ -32,6 +33,7 @@ def clock_bg():
|
||||
uhr.rt(0.5)
|
||||
uhr.pu()
|
||||
|
||||
|
||||
# Funktion des Sekundenzeigers
|
||||
def sekzeiger():
|
||||
sekundenzeiger.pu()
|
||||
@@ -77,6 +79,7 @@ def stzeiger():
|
||||
stundenzeiger.bk(15)
|
||||
stundenzeiger.fd(135)
|
||||
|
||||
|
||||
# Ganze Uhr
|
||||
def clock():
|
||||
sekundenzeiger.clear()
|
||||
@@ -93,6 +96,7 @@ def clock():
|
||||
stzeiger()
|
||||
turtle.update()
|
||||
|
||||
|
||||
# Stoppen der Uhr
|
||||
def stop():
|
||||
global run
|
||||
@@ -117,7 +121,6 @@ def settings():
|
||||
print("process ended")
|
||||
|
||||
|
||||
|
||||
# Startzeit einblenden
|
||||
print(time.strftime("%H:%M:%S"))
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ screensize(1080,1920)
|
||||
shape("testimage.gif")
|
||||
color("red")
|
||||
speed(1000)
|
||||
|
||||
|
||||
def walk():
|
||||
w = 10
|
||||
length = 100
|
||||
@@ -17,5 +19,6 @@ def walk():
|
||||
fd(length)
|
||||
rt(90)
|
||||
|
||||
|
||||
walk()
|
||||
exitonclick()
|
||||
@@ -1,3 +1,4 @@
|
||||
# Yes, that is called concat, but sure
|
||||
x = input("Wert x: ")
|
||||
y = input("Wert y: ")
|
||||
z = input("Wert z: ")
|
||||
@@ -11,5 +12,3 @@ while remaining > 1:
|
||||
start += 6
|
||||
ending += 6
|
||||
remaining -= 6
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# No, there is not in fact any recursion here
|
||||
from turtle import *
|
||||
|
||||
t1 = Turtle()
|
||||
t2 = Turtle()
|
||||
|
||||
|
||||
|
||||
go = 3
|
||||
t1.lt(90)
|
||||
t1.speed(1000)
|
||||
@@ -28,7 +28,6 @@ def gogo():
|
||||
print(xcor())
|
||||
go = 1
|
||||
|
||||
|
||||
while go > 0 and go < 2:
|
||||
if t1.xcor() > (window_width() / 2 - window_width() / 2 + 50):
|
||||
for i in range(50):
|
||||
@@ -44,6 +43,7 @@ def gogo():
|
||||
onkey(gogo, "space")
|
||||
print("ready")
|
||||
|
||||
|
||||
t2.ht()
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
|
||||
global mistakes
|
||||
mistakes = 0
|
||||
global wortelements
|
||||
@@ -6,8 +7,9 @@ wortelements = []
|
||||
global done
|
||||
done = []
|
||||
|
||||
|
||||
def clear_screen():
|
||||
os.system('cls')
|
||||
os.system("cls")
|
||||
|
||||
|
||||
def worteingabe():
|
||||
@@ -18,17 +20,21 @@ def worteingabe():
|
||||
print("Geben Sie das Gerät weiter.")
|
||||
ausgabe(wort)
|
||||
|
||||
|
||||
def ausgabe(wort):
|
||||
global wortelements
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
Das Wort:
|
||||
""")
|
||||
"""
|
||||
)
|
||||
print(len(wort) * "*")
|
||||
global wholewordlist
|
||||
wholewordlist = list(wort)
|
||||
wortelements = list(len(wort) * "*")
|
||||
|
||||
|
||||
def ersetzen(letter):
|
||||
global wort
|
||||
global wortelements
|
||||
@@ -49,7 +55,9 @@ def raten():
|
||||
global go
|
||||
go = 1
|
||||
while go == 1:
|
||||
buchstabe = input("Suchen sie einen Buchstaben aus, welcher sich im Wort befinden könnte: ")
|
||||
buchstabe = input(
|
||||
"Suchen sie einen Buchstaben aus, welcher sich im Wort befinden könnte: "
|
||||
)
|
||||
if buchstabe in wholewordlist:
|
||||
print("Der Buchstabe kommt hier vor:")
|
||||
ersetzen(buchstabe)
|
||||
@@ -69,12 +77,14 @@ def raten():
|
||||
if len(wort) - counts <= 0:
|
||||
go = 0
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
DAS WORT WURDE GEFUNDEN
|
||||
Das Wort:
|
||||
""")
|
||||
"""
|
||||
)
|
||||
print(wort)
|
||||
|
||||
|
||||
@@ -82,15 +92,18 @@ def addman():
|
||||
global mistakes
|
||||
mistakes += 1
|
||||
if mistakes == 1:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
__________
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 2:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -98,9 +111,11 @@ def addman():
|
||||
|
||||
|
|
||||
_____|_____
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 3:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -108,9 +123,11 @@ def addman():
|
||||
|
|
||||
|
|
||||
_____|_____
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 4:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
|
||||
|
|
||||
@@ -118,9 +135,11 @@ def addman():
|
||||
|
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 5:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
|
|
||||
|
|
||||
@@ -128,9 +147,11 @@ def addman():
|
||||
|
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 6:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
| |
|
||||
| °
|
||||
@@ -138,9 +159,11 @@ def addman():
|
||||
|
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 6:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
| |
|
||||
| °
|
||||
@@ -148,9 +171,11 @@ def addman():
|
||||
|
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 7:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
| |
|
||||
| °
|
||||
@@ -158,9 +183,11 @@ def addman():
|
||||
|
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 8:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
| |
|
||||
| °
|
||||
@@ -168,9 +195,11 @@ def addman():
|
||||
| /
|
||||
|\
|
||||
_____|_\___
|
||||
""")
|
||||
"""
|
||||
)
|
||||
elif mistakes == 9:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
_____
|
||||
| |
|
||||
| °
|
||||
@@ -181,13 +210,11 @@ def addman():
|
||||
|
||||
|
||||
DEAD
|
||||
""")
|
||||
"""
|
||||
)
|
||||
global go
|
||||
go = 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
worteingabe()
|
||||
raten()
|
||||
@@ -8,6 +8,7 @@ turtle.ht()
|
||||
turtle.tracer(0)
|
||||
turtle.speed(0)
|
||||
|
||||
|
||||
# Definition der Kreise
|
||||
def circles(fill):
|
||||
turtle.pu()
|
||||
@@ -21,10 +22,12 @@ def circles(fill):
|
||||
turtle.end_fill()
|
||||
turtle.pu()
|
||||
|
||||
|
||||
turtle.home()
|
||||
turtle.pu()
|
||||
turtle.bk(25)
|
||||
|
||||
|
||||
# Postitionieren der Turtle
|
||||
def distance(pixels):
|
||||
turtle.home()
|
||||
@@ -33,6 +36,7 @@ def distance(pixels):
|
||||
turtle.bk(pixels)
|
||||
turtle.rt(90)
|
||||
|
||||
|
||||
# Berechnen der einzelnen Stellen
|
||||
def main():
|
||||
turtle.clear()
|
||||
@@ -44,7 +48,6 @@ def main():
|
||||
mn_pos2 = min // 2
|
||||
sk_pos2 = sec // 2
|
||||
|
||||
|
||||
for i in range(6):
|
||||
hr_pos2 = hr_pos2 // 2
|
||||
hr_pos = hr_pos2 % 2
|
||||
@@ -66,6 +69,7 @@ def main():
|
||||
|
||||
turtle.update()
|
||||
|
||||
|
||||
# Ausführen
|
||||
while True:
|
||||
main()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from turtle import *
|
||||
import time
|
||||
|
||||
|
||||
def scene(d):
|
||||
dot(500 / d)
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from turtle import *
|
||||
import time
|
||||
|
||||
r = numinput("PENTAGON", "Wie gross soll die Seitenlänge des Pentagons sein?", 200)
|
||||
rl = numinput("PENTAGON", "Wie viele Ebenen sollen benuzt werden?", 3)
|
||||
tracer(0)
|
||||
|
||||
|
||||
def pentagon(n, radius):
|
||||
if n == 0:
|
||||
# ausgefülltes Pentagon zeichnen
|
||||
@@ -24,6 +26,7 @@ def pentagon(n, radius):
|
||||
pentagon(n - 1, radius * 0.381966)
|
||||
update()
|
||||
|
||||
|
||||
starttime = time.time()
|
||||
pu()
|
||||
lt(90)
|
||||
@@ -33,4 +36,4 @@ bk(r*0.6)
|
||||
pd()
|
||||
pentagon(rl, r)
|
||||
|
||||
exitonclick();
|
||||
exitonclick()
|
||||
|
||||
@@ -4,11 +4,11 @@ speed(10000)
|
||||
ht()
|
||||
|
||||
|
||||
|
||||
def kreis_halb(anzahl_seiten, radius):
|
||||
for i in range(anzahl_seiten):
|
||||
fd(radius / anzahl_seiten)
|
||||
rt(360 / anzahl_seiten)
|
||||
|
||||
|
||||
kreis_halb(500, 800)
|
||||
exitonclick()
|
||||
|
||||
@@ -9,7 +9,9 @@ sideby = int(turtle.numinput("Huhn", "Punkt B, cord y", -100))
|
||||
sidebx = int(turtle.numinput("Huhn", "Punkt B, cord x", -200))
|
||||
sidecy = int(turtle.numinput("Huhn", "Punkt C, cord y", 200))
|
||||
sidecx = int(turtle.numinput("Huhn", "Punkt C, cord x", 0))
|
||||
anzahl_durchgaenge = int(turtle.numinput("Huhn", "Anzahl Durchgänge", 10, minval=1, maxval=100))
|
||||
anzahl_durchgaenge = int(
|
||||
turtle.numinput("Huhn", "Anzahl Durchgänge", 10, minval=1, maxval=100)
|
||||
)
|
||||
stiftdicke = int(turtle.numinput("Huhn", "Stiftdicke", 2, minval=1, maxval=50))
|
||||
durchgang = 0
|
||||
|
||||
@@ -43,6 +45,7 @@ def motion(sideay,sideax,sideby,sidebx,sidecy,sidecx,stiftdicke):
|
||||
huhn.dot(stiftdicke)
|
||||
huhn.pu()
|
||||
|
||||
|
||||
def motion_pre(sideay, sideax, sideby, sidebx, sidecy, sidecx, stiftdicke):
|
||||
edge = random.randint(1, 3)
|
||||
if edge == 1:
|
||||
@@ -60,6 +63,7 @@ def motion_pre(sideay,sideax,sideby,sidebx,sidecy,sidecx,stiftdicke):
|
||||
nextpos = (math.sqrt((x - huhn.xcor()) ** 2 + (y - huhn.ycor()) ** 2)) / 2
|
||||
huhn.fd(nextpos)
|
||||
|
||||
|
||||
def cagedraw(sideax, sideay, sidebx, sideby, sidecx, sidecy):
|
||||
cage.pu()
|
||||
cage.setpos(sideax, sideay)
|
||||
|
||||
@@ -2,6 +2,7 @@ from turtle import*
|
||||
|
||||
speed(1000)
|
||||
|
||||
|
||||
def blatt(seite, winkel, anzahl):
|
||||
for i in range(anzahl):
|
||||
begin_fill()
|
||||
@@ -11,6 +12,7 @@ def blatt(seite,winkel,anzahl):
|
||||
end_fill()
|
||||
rt(360 / anzahl)
|
||||
|
||||
|
||||
ht()
|
||||
color("green")
|
||||
blatt(100, 120, 4)
|
||||
|
||||
@@ -4,6 +4,7 @@ import time
|
||||
|
||||
turtle.pu()
|
||||
|
||||
|
||||
def vieleck_random_randomize():
|
||||
for i in range(random.randint(25, 100)):
|
||||
turtle.color(random.random(), random.random(), random.random())
|
||||
@@ -25,6 +26,7 @@ def vieleck_random_randomize():
|
||||
turtle.rt(360 / ecken)
|
||||
turtle.pu()
|
||||
|
||||
|
||||
print("Random Design")
|
||||
draw_time_start = time.time()
|
||||
vieleck_random_randomize()
|
||||
@@ -32,4 +34,4 @@ draw_time_end = time.time()
|
||||
print("Drawing has taken", draw_time_end - draw_time_start, "seconds")
|
||||
print("Click to exit")
|
||||
|
||||
turtle.exitonclick();
|
||||
turtle.exitonclick()
|
||||
|
||||
@@ -7,5 +7,5 @@ while True:
|
||||
time.sleep(0.5)
|
||||
print("=", end="\r", flush=True)
|
||||
time.sleep(0.5)
|
||||
os.system( 'cls' )
|
||||
os.system("cls")
|
||||
time.sleep(0.5)
|
||||
@@ -13,4 +13,3 @@ for i in range(10):
|
||||
lt(90)
|
||||
width(dicke)
|
||||
dicke += 2
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from turtle import *
|
||||
|
||||
a = int(numinput("Wie alt bist du?", "Bitte als Zahl eingeben",16,minval=1,maxval=100))
|
||||
a = int(
|
||||
numinput("Wie alt bist du?", "Bitte als Zahl eingeben", 16, minval=1, maxval=100)
|
||||
)
|
||||
|
||||
while (a >= 16) and (a <= 20):
|
||||
fd(100)
|
||||
|
||||
@@ -28,16 +28,21 @@ def inputs():
|
||||
z = int(zl) - 1
|
||||
s = ord(sp) - 65
|
||||
if bd[z][s] > 0:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
THAT FIELD IS ALREADY TAKEN, CHOOSE DIFFERENT ONE!
|
||||
""")
|
||||
"""
|
||||
)
|
||||
else:
|
||||
inputremap(z, s)
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
PLEASE TYPE IN A LEGIT COORDINATE:
|
||||
FORM: Coordinate Y Coordinate X --> Ex. A1/A2
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def inputremap(z, s):
|
||||
global player
|
||||
@@ -63,9 +68,11 @@ def winning():
|
||||
global go
|
||||
go = 1
|
||||
count = 0
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
checking for winner
|
||||
""")
|
||||
"""
|
||||
)
|
||||
while go == 1:
|
||||
if sum(bd[x]) == 3:
|
||||
go = 0
|
||||
@@ -88,11 +95,14 @@ checking for winner
|
||||
y += 1
|
||||
if count >= 2:
|
||||
go = 0
|
||||
print("""no winner yet
|
||||
""")
|
||||
print(
|
||||
"""no winner yet
|
||||
"""
|
||||
)
|
||||
else:
|
||||
count += 1
|
||||
|
||||
|
||||
def full(filled_field):
|
||||
global bd
|
||||
if filled_field == 9:
|
||||
@@ -133,12 +143,11 @@ def board_draw():
|
||||
yy += 1
|
||||
|
||||
|
||||
|
||||
|
||||
# MAIN CYCLE
|
||||
print(50 * ("\n"))
|
||||
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
------------------------------------------------------
|
||||
|
||||
@@ -153,35 +162,42 @@ print("""
|
||||
|
||||
|
||||
by Janis Hutz
|
||||
""")
|
||||
"""
|
||||
)
|
||||
time.sleep(2)
|
||||
print("starting...")
|
||||
time.sleep(3)
|
||||
print("\n\n\n")
|
||||
goahead = 1
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
| |
|
||||
----------------
|
||||
| |
|
||||
----------------
|
||||
| |
|
||||
""")
|
||||
"""
|
||||
)
|
||||
while goahead == 1:
|
||||
while play == 1:
|
||||
inputs()
|
||||
board_draw()
|
||||
time.sleep(2)
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
REPLAY?
|
||||
""")
|
||||
"""
|
||||
)
|
||||
i = input("""Choose: (y/n)""")
|
||||
if i == "y":
|
||||
goahead = 1
|
||||
play = 1
|
||||
else:
|
||||
goahead = 0
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
GOOD BYE!
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -4,6 +4,7 @@ lt(90)
|
||||
width(3)
|
||||
speed(1000)
|
||||
|
||||
|
||||
def stiel(orientation):
|
||||
color("green")
|
||||
for i in range(50):
|
||||
@@ -22,8 +23,6 @@ def leaves():
|
||||
rt(360 / 100)
|
||||
|
||||
|
||||
|
||||
|
||||
def blume(orientation_in, blaetter):
|
||||
stiel(orientation_in)
|
||||
for i in range(blaetter):
|
||||
|
||||
@@ -2,12 +2,10 @@ eingabe = input("Dein Text: ")
|
||||
caracter = -1
|
||||
morecaracters = True
|
||||
amountleft = len(eingabe)
|
||||
while morecaracters == True:
|
||||
while morecaracters:
|
||||
print(eingabe[caracter], end="")
|
||||
if amountleft > 1:
|
||||
caracter -= 1
|
||||
amountleft -= 1
|
||||
else:
|
||||
morecaracters = False
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import time
|
||||
import random
|
||||
|
||||
global stepscount
|
||||
stepscount = 0
|
||||
inventory = []
|
||||
@@ -9,10 +10,9 @@ global goahead
|
||||
goahead = 0
|
||||
|
||||
|
||||
|
||||
|
||||
def cover():
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -48,15 +48,18 @@ def cover():
|
||||
|
||||
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
time.sleep(2)
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
DIES BASIERT AUF EINER WAHREN TATSACHE. DIE SPIELELEMENTE SIND VEREINFACHT UND TEILS
|
||||
UNREALISTISCH DARGESTELLT. WICHTIGE DETAILS WERDEN ZUR EINFACHEREN VERSTÄNDLICHKEIT
|
||||
WEGGELASSEN. DER ERMITTLUNGSPROZESS IST IN WIRKLICHKEIT EINE UNGEHEURLICH SCHWIERIGE
|
||||
AUFGABE UND WIRD HIER AUF EIN MÖGLICHST ÜBERSCHAUBARES MASS GEKÜRZT.
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
time.sleep(5)
|
||||
go = 0
|
||||
while go == 0:
|
||||
@@ -69,7 +72,6 @@ AUFGABE UND WIRD HIER AUF EIN MÖGLICHST ÜBERSCHAUBARES MASS GEKÜRZT.
|
||||
start = time.time()
|
||||
|
||||
|
||||
|
||||
def gameoverpossible():
|
||||
global start
|
||||
if "grounding" not in done:
|
||||
@@ -85,30 +87,35 @@ def gameoverpossible():
|
||||
else:
|
||||
current = time.time()
|
||||
|
||||
|
||||
def gameover1():
|
||||
if random.randint(0, 10) == 1:
|
||||
gameover()
|
||||
else:
|
||||
current = time.time()
|
||||
|
||||
|
||||
def gameover2():
|
||||
if random.randint(0, 6) == 1:
|
||||
gameover()
|
||||
else:
|
||||
current = time.time()
|
||||
|
||||
|
||||
def gameover3():
|
||||
if random.randint(0, 3) == 1:
|
||||
gameover()
|
||||
else:
|
||||
current = time.time()
|
||||
|
||||
|
||||
def gameover():
|
||||
global next
|
||||
next = 0
|
||||
global exit
|
||||
exit = 0
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
NEW YORK TIMES
|
||||
|
||||
DIE KATASTROPHE
|
||||
@@ -125,34 +132,41 @@ Flugverbot für die 737 MAX ausgesprochen hatte.
|
||||
|
||||
Oh weh.
|
||||
Das wird einige Konsequenzen für dich nach sich ziehen.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
time.sleep(4)
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
|
||||
Es ist der nächste Morgen. Du machst dich auf zum Gericht.
|
||||
Die Richter entziehen den Fall deiner Verantwortung und verurteilen dich zu
|
||||
lebenslänglicher Haft, aufgrund von fahrlässiger Tötung. Das ist das Ende deiner
|
||||
Karriere.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
print("Punktezahl: 0")
|
||||
|
||||
|
||||
|
||||
def einfuehrung():
|
||||
print("""Es ist Samstagmorgen... Urplötzlich stürzt eine fast brandneue Boeing 737MAX
|
||||
print(
|
||||
"""Es ist Samstagmorgen... Urplötzlich stürzt eine fast brandneue Boeing 737MAX
|
||||
von Ethiopian Airlines ab. Die Welt ist schockiert, da dies bereits der zweite Absturz dieses
|
||||
Typs ist. Beides Mal waren fast brandneue Flugzeuge involviert. Beide Abstürze ähnelten sich
|
||||
massiv. Deine Aufgabe ist es nun, die Absturze zu klären.""")
|
||||
print("""
|
||||
massiv. Deine Aufgabe ist es nun, die Absturze zu klären."""
|
||||
)
|
||||
print(
|
||||
"""
|
||||
Als neu ernannter Ermittler musst du dir bereits jetzt eine wichtige Frage stellen:
|
||||
Solltest du ein weltweites Flugverbot für diesen Flugzeugtypen verhängen?
|
||||
Sowohl Boeing als auch die Fluggesellschaften werden sich dagegen sträuben.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
i = userinput("Willst du das Flugverbot verhängen? (y/n)")
|
||||
if i == "y":
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
NEW YORK TIMES
|
||||
|
||||
NTSB ERMITTLER VERHÄNGT FLUGVERBOT FÜR UNGLÜCKSFLIEGER
|
||||
@@ -163,22 +177,27 @@ zu verhängen. Dies ist auf massive Proteste seitens der Fluggesellschaften und
|
||||
gestossen. Jedoch: Viele Aviatikexperten befürworten den Entscheid des Ermittlers. Die
|
||||
Sicherheit der Passagiere muss um jeden Preis gewährleistet werden. Die einzige Möglichkeit
|
||||
dies zu gewährleisten ist, ein Flugverbot auszusprechen.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
done.append("grounding")
|
||||
elif i == "n":
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Die Wirtschaft ist wichtig, ein Pilotenfehler kann ja nicht ausgeschlossen werden.
|
||||
Ermitteln wir!
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
else:
|
||||
print("wrong, retry")
|
||||
einfuehrung()
|
||||
time.sleep(4)
|
||||
|
||||
|
||||
def grundriss():
|
||||
if "grounding" in done:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
_________________________________________________________________________________________________________
|
||||
|
||||
@@ -188,9 +207,11 @@ braucht sie, um das Flugzeug zu verbessern. Der Zeitdruck ist aber geringer, da
|
||||
weiteren Abstürze geschehen können.
|
||||
Hier kannst du alle Gegenstände, welche du auf der Unfallstelle finden kannst
|
||||
untersuchen, um die mögliche Unfallursache herauszufinden.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
_________________________________________________________________________________________________________
|
||||
|
||||
@@ -199,16 +220,19 @@ Dies ist dein Arbeitsplatz an der Unfallstelle. Du solltest dich so schnell wie
|
||||
möglich um diesen Fall kümmern, denn sonst könnte es zu weiteren Abstürzen kommen.
|
||||
Hier kannst du alle Gegenstände, welche du auf der Unfallstelle finden kannst
|
||||
untersuchen, um die mögliche Unfallursache herauszufinden.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def abspann():
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
|
||||
DU HAST ES GESCHAFFT!
|
||||
GLÜCKWUNSCH!
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
global start
|
||||
global stepscount
|
||||
times = time.time() - start
|
||||
@@ -223,9 +247,12 @@ DU HAST ES GESCHAFFT!
|
||||
print("\nDeine Anzahl Schritte (Je geringer desto besser):", stepscount)
|
||||
bewertung(points)
|
||||
|
||||
|
||||
def bewertung(punkte):
|
||||
print("""
|
||||
DEINE BEWERTUNG:""")
|
||||
print(
|
||||
"""
|
||||
DEINE BEWERTUNG:"""
|
||||
)
|
||||
if punkte <= 0:
|
||||
print(""" GOD """)
|
||||
if punkte < 20:
|
||||
@@ -245,71 +272,92 @@ def bewertung(punkte):
|
||||
def userinput(question):
|
||||
return input(question).lower()
|
||||
|
||||
|
||||
def makedone(item):
|
||||
inventory.remove(item)
|
||||
done.append(item)
|
||||
|
||||
|
||||
def eb():
|
||||
global stepscount
|
||||
stepscount += 1
|
||||
print("""Du befindest dich jetzt im Ermittlerbüro.
|
||||
""")
|
||||
print(
|
||||
"""Du befindest dich jetzt im Ermittlerbüro.
|
||||
"""
|
||||
)
|
||||
while len(inventory) > 0:
|
||||
stepscount += 1
|
||||
if "blackbox" in inventory:
|
||||
makedone("blackbox")
|
||||
print("""Da du ja jetzt die Blackbox des Flugzeugs gefunden hast,
|
||||
print(
|
||||
"""Da du ja jetzt die Blackbox des Flugzeugs gefunden hast,
|
||||
kannst du sie hier im Ermittlerbüro aufmachen und die Flugdaten auslesen.
|
||||
Dies dauert jedoch eine gewisse Zeit. Du öffnest ihn und hoffst, dass einer
|
||||
deiner Spezialisten die Daten retten kann.""")
|
||||
deiner Spezialisten die Daten retten kann."""
|
||||
)
|
||||
time.sleep(7)
|
||||
print("""Dein Spezialist hat es geschafft! Die Daten konten wiederhergestellt werden!
|
||||
print(
|
||||
"""Dein Spezialist hat es geschafft! Die Daten konten wiederhergestellt werden!
|
||||
Du siehst eine Auffälligkeit in den Daten der Flughöhe und der vertikalen Geschwindigkeit.
|
||||
Dies deutet auf massive technische Probleme hin. Auch die Daten des Anstellwinkelsensors 1,
|
||||
sind auffällig: Er hatte die ganze Zeit denselben Anstellwinkel angezeigt.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
if "anstellwinkelsensor" in inventory:
|
||||
print("""Glücklicherweise hast du ihn bereits auf dem Trümmerfeld entdeckt.
|
||||
Du untersuchst ihn nun.""")
|
||||
print(
|
||||
"""Glücklicherweise hast du ihn bereits auf dem Trümmerfeld entdeckt.
|
||||
Du untersuchst ihn nun."""
|
||||
)
|
||||
elif "anstellwinkelsensor" in done:
|
||||
print("""Du hast ihn ja bereits untersucht. """)
|
||||
else:
|
||||
print("""Du solltest dich vielleicht nach dem Sensor umsehen.""")
|
||||
elif "anstellwinkelsensor" in inventory:
|
||||
makedone("anstellwinkelsensor")
|
||||
print("""Da du ja zuvor den Anstellwinkelsensor des Flugzeugs gefunden hast,
|
||||
print(
|
||||
"""Da du ja zuvor den Anstellwinkelsensor des Flugzeugs gefunden hast,
|
||||
kannst du ihn jetzt auf Schäden überprüfen. Du untersuchst die Ströme, welche der
|
||||
Sensor bei Bewegung ausgibst und machst eine Entdeckung:
|
||||
ER FUNKTIONIERT NICHT!
|
||||
Logischerweise könnte er auch durch den Aufprall beschädigt sein, """)
|
||||
Logischerweise könnte er auch durch den Aufprall beschädigt sein, """
|
||||
)
|
||||
if "blackbox" in done:
|
||||
print("""aber die Blackbox bestätigt ja den Ausfall des Sensors.
|
||||
Du bist der Ursache auf der Spur. Glückwunsch!""")
|
||||
print(
|
||||
"""aber die Blackbox bestätigt ja den Ausfall des Sensors.
|
||||
Du bist der Ursache auf der Spur. Glückwunsch!"""
|
||||
)
|
||||
global goahead
|
||||
goahead = 1
|
||||
inventory.clear()
|
||||
else:
|
||||
print("""du solltest deshalb die Blackbox finden, um den Ausfall zu
|
||||
print(
|
||||
"""du solltest deshalb die Blackbox finden, um den Ausfall zu
|
||||
bestätigen.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
print("\n")
|
||||
elif "turbine" in inventory:
|
||||
print("""Du hast eine der beiden Turbinen in das Büro transportieren lassen.
|
||||
print(
|
||||
"""Du hast eine der beiden Turbinen in das Büro transportieren lassen.
|
||||
Als mögliche Absturzursache hast du Triebwerksversagen im Verdacht. Beim Betrachten
|
||||
der Triebwerke erkennst du aber an der Verformung der Schaufeln und dem Dreck
|
||||
in der Turbine selbst, also im Kompressor, dass sie voll funktionstüchtig war.
|
||||
Somit kann ein Absturz durch Triebwerksversagen ausgeschlossen werden.
|
||||
Denn ein modernes Flugzeug kann auch mit nur einem Triebwerk problemlos fliegen.""")
|
||||
Denn ein modernes Flugzeug kann auch mit nur einem Triebwerk problemlos fliegen."""
|
||||
)
|
||||
makedone("turbine")
|
||||
elif "zeugen" in inventory:
|
||||
makedone("zeugen")
|
||||
print("""Du hast ja auch bereits die Zeugen befragt. Du schaust dir deine
|
||||
print(
|
||||
"""Du hast ja auch bereits die Zeugen befragt. Du schaust dir deine
|
||||
Notizen lange an, kannst aber nichts erkennen, was dir für den Fall helfen könnte.
|
||||
Du verwirfst die Aussagen als nicht aussagekräftig.""")
|
||||
Du verwirfst die Aussagen als nicht aussagekräftig."""
|
||||
)
|
||||
time.sleep(5)
|
||||
if goahead == 1:
|
||||
stepscount += 1
|
||||
print("""Du wendest dich nun den Pilotenakten zu. Der Kapitän hatte beachtliche
|
||||
print(
|
||||
"""Du wendest dich nun den Pilotenakten zu. Der Kapitän hatte beachtliche
|
||||
8000 Flugstunden und soweit du erkennen magst, auch keine bekannten Probleme. Auch die
|
||||
(kurze) Karriere des Copiloten war makellos, er hatte jedoch nur 200 Flugstunden.
|
||||
Die Piloten hatten beim Kontakt mit dem Tower Probleme gemeldet und zur Umkehr
|
||||
@@ -328,32 +376,41 @@ gewährleisten. Dies hatte dazu geführt, dass bei dem schon sehr alten Flugzeug
|
||||
Pitch-Up moment grösser wurde und somit die Nase des Flugzeugs in gewissen Fluglagen
|
||||
unkontrolliert nach oben gehen kann. Das MCAS sollte dies verhindern, denn diese Fluglage
|
||||
führt unweigerlich zu einem Strömungsabriss, bei welchem das Flugzeug sogesagt "vom Himmel
|
||||
fallen würde".""")
|
||||
fallen würde"."""
|
||||
)
|
||||
time.sleep(10)
|
||||
if "grounding" in done:
|
||||
stepscount -= 2
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Nachdem du ja glücklicherweise bereits bei Ermittlungsbeginn das Grounding des Typs andgeordnet hattest.
|
||||
Die Fluggesellschaften und Boeing hatten zwar nicht sehr positiv darauf reagiert, aber mit dem was
|
||||
du herausgefunden hattest, sind jetzt alle froh, dass du es getan hattest.
|
||||
Die 737 MAX war anschliessend bis im Dezember 2020 gegroundet und Boeing fuhr durch dieses Problem
|
||||
massive Verluste ein.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
else:
|
||||
stepscount += 10
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Alle sind schockiert, dass du nicht bereits bei Ermittlungsbeginn ein Grounding angeordnet hattest.
|
||||
Boeing und auch die Fluggesellschaften fanden es zwar erst besser, aber auch sie sind jetzt der Meinung,
|
||||
dass es besser gewesen wäre, wenn du bereits da ein Grounding angeordnet hättest. Deine Haltung davon ist
|
||||
zwar verständlich, aber du wirst trotzdem zur Verantwortung gezogen. Du musst eine Haftstrafe von einem
|
||||
Jahr absitzen, da du viele Personen in Gefahr gebracht hast. Trotzdem, der Fall ist geklärt.
|
||||
""")
|
||||
"""
|
||||
)
|
||||
return 0
|
||||
else:
|
||||
print("""Um etwas untersuchen zu können, musst du erst etwas in dein Inventar nehmen,
|
||||
print(
|
||||
"""Um etwas untersuchen zu können, musst du erst etwas in dein Inventar nehmen,
|
||||
dann hier zurückkehren. Gehe dazu hinaus auf die Unfallstelle.
|
||||
Auch da könnten sich wichtige Hinweise verstecken.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Heck (h) oder willst du Zeugen befragen (z)? ")
|
||||
Auch da könnten sich wichtige Hinweise verstecken."""
|
||||
)
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Heck (h) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "f":
|
||||
@@ -364,13 +421,14 @@ Auch da könnten sich wichtige Hinweise verstecken.""")
|
||||
return 5
|
||||
|
||||
|
||||
|
||||
def fl():
|
||||
global stepscount
|
||||
stepscount += 1
|
||||
if "flügel" in visited:
|
||||
print("""Du hast den Flügel bereits untersucht.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Heck (h), zum Büro (b) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Heck (h), zum Büro (b) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "b":
|
||||
@@ -383,19 +441,23 @@ def fl():
|
||||
print("wrong, retry")
|
||||
return 2
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Der Flügel. Komplett zertrümmert. Er scheint in einem beinahe 90° Winkel
|
||||
aufgeschlagen zu sein. Du und dein Team finden eine der beiden Turbinen. Du lässt
|
||||
sie in dein Büro transportieren, um sie dort zu untersuchen. Du kannst entweder
|
||||
in dein Büro gehen oder weitersuchen.""")
|
||||
in dein Büro gehen oder weitersuchen."""
|
||||
)
|
||||
i = userinput("Willst du zurück? (y/n)")
|
||||
visited.append("flügel")
|
||||
time.sleep(2)
|
||||
if i == 'y':
|
||||
if i == "y":
|
||||
return 1
|
||||
elif i == 'n':
|
||||
elif i == "n":
|
||||
print("""Du willst also weitersuchen.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Heck (h) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Heck (h) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "h":
|
||||
@@ -407,13 +469,14 @@ in dein Büro gehen oder weitersuchen.""")
|
||||
return 2
|
||||
|
||||
|
||||
|
||||
def hk():
|
||||
global stepscount
|
||||
stepscount += 1
|
||||
if "heck" in visited:
|
||||
print("""Du hast das Heck bereits untersucht.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Büro (b) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Büro (b) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "b":
|
||||
@@ -426,19 +489,23 @@ def hk():
|
||||
print("wrong, retry")
|
||||
return 3
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Du entdeckst etwas, das wie das Seitenleitwerks des Flugzeugs aussehen könnte.
|
||||
Dein grösstes Ziel ist, die Blackbox zu finden. Du hebst Teile an, und plötzlich siehst du sie:
|
||||
Die Blackbox. Du hebst sie auf und lässt sie in dein Büro bringen. """)
|
||||
Die Blackbox. Du hebst sie auf und lässt sie in dein Büro bringen. """
|
||||
)
|
||||
inventory.append("blackbox")
|
||||
time.sleep(1)
|
||||
visited.append("heck")
|
||||
i = userinput("Willst du zurück? (y/n)")
|
||||
if i == 'y':
|
||||
if i == "y":
|
||||
return 1
|
||||
elif i == 'n':
|
||||
elif i == "n":
|
||||
print("""Du willst also weitersuchen.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Flügel (h) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Flügel (h) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "f":
|
||||
@@ -450,13 +517,14 @@ Die Blackbox. Du hebst sie auf und lässt sie in dein Büro bringen. """)
|
||||
return 3
|
||||
|
||||
|
||||
|
||||
def zg():
|
||||
global stepscount
|
||||
stepscount += 1
|
||||
if "zeugen" in visited:
|
||||
print("""Du hast die Zeugen bereits befragt.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Büro (b) oder zum Heck (h)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Flügel (f), zum Büro (b) oder zum Heck (h)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "b":
|
||||
@@ -469,7 +537,8 @@ def zg():
|
||||
print("wrong, retry")
|
||||
return 5
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Du machst dich auf den Weg in ein nahegelegenes Dorf, da du gehört hast, dass eine Person
|
||||
den Absturz gesehen hat.
|
||||
- Hallo. Sie haben den Absturz mitverfolgt?
|
||||
@@ -481,16 +550,19 @@ den Absturz gesehen hat.
|
||||
- Vielen Dank. Sie haben mir geholfen.
|
||||
|
||||
Du machst dich auf den Weg zurück zur Unfallstelle. Willst du dir direkt Gedanken über die
|
||||
Aussagen machen? Dafür musst du ins Büro zurück. """)
|
||||
Aussagen machen? Dafür musst du ins Büro zurück. """
|
||||
)
|
||||
inventory.append("zeugen")
|
||||
time.sleep(1)
|
||||
visited.append("zeugen")
|
||||
i = userinput("Willst du zurück? (y/n)")
|
||||
if i == 'y':
|
||||
if i == "y":
|
||||
return 1
|
||||
elif i == 'n':
|
||||
elif i == "n":
|
||||
print("""Du willst also weitersuchen.""")
|
||||
i = userinput("Wo willst du hin? Zum Cockpit (c), zum Heck (h) oder zum Flügel (f)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Cockpit (c), zum Heck (h) oder zum Flügel (f)? "
|
||||
)
|
||||
if i == "c":
|
||||
return 4
|
||||
if i == "h":
|
||||
@@ -502,13 +574,14 @@ den Absturz gesehen hat.
|
||||
return 5
|
||||
|
||||
|
||||
|
||||
def co():
|
||||
global stepscount
|
||||
stepscount += 1
|
||||
if "cockpit" in visited:
|
||||
print("""Du hast das Cockpit bereits untersucht.""")
|
||||
i = userinput("Wo willst du hin? Zum Heck (h), zum Flügel (f), zum Büro (b) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Heck (h), zum Flügel (f), zum Büro (b) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "h":
|
||||
return 3
|
||||
if i == "b":
|
||||
@@ -521,19 +594,23 @@ def co():
|
||||
print("wrong, retry")
|
||||
return 4
|
||||
else:
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Du näherst dich der Nase des Flugzeugs. Vorsichtig läufst du umher. Vor dir liegt ein Sensor.
|
||||
Er scheint defekt zu sein. Du hebst ihn auf und lässt ihn in dein Büro bringen.
|
||||
Du kannst zurück gehen und ihn untersuchen oder weitersuchen.""")
|
||||
Du kannst zurück gehen und ihn untersuchen oder weitersuchen."""
|
||||
)
|
||||
inventory.append("anstellwinkelsensor")
|
||||
time.sleep(1)
|
||||
visited.append("cockpit")
|
||||
i = userinput("Willst du zurück? (y/n)")
|
||||
if i == 'y':
|
||||
if i == "y":
|
||||
return 1
|
||||
elif i == 'n':
|
||||
elif i == "n":
|
||||
print("""Du willst also weitersuchen.""")
|
||||
i = userinput("Wo willst du hin? Zum Flügel (f), zum Heck (h) oder willst du Zeugen befragen (z)? ")
|
||||
i = userinput(
|
||||
"Wo willst du hin? Zum Flügel (f), zum Heck (h) oder willst du Zeugen befragen (z)? "
|
||||
)
|
||||
if i == "f":
|
||||
return 2
|
||||
if i == "h":
|
||||
@@ -545,8 +622,6 @@ Du kannst zurück gehen und ihn untersuchen oder weitersuchen.""")
|
||||
return 4
|
||||
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
cover()
|
||||
einfuehrung()
|
||||
@@ -574,4 +649,5 @@ def main():
|
||||
if exit == 1:
|
||||
abspann()
|
||||
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user