Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
def fac(n):
if n == 1:
return 1
else:
return n*fac(n-1)

def demo():
print("Demo")
print(f'fac(6) = {fac(6)}')

if __name__ == '__main__':
demo()


Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
def fac(n):
r = 1
for i in range(2, n+1):
print(i)
r *= i
return r

def demo():
print("Demo")
print(f'fac(6) = {fac(6)}')

if __name__ == '__main__':
demo()


Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ fun CollectionOfSamples.rebasingSandbox() {
"""
) {
createRepo("repo-rebase") {
createFileAndCommit("hello") { content = "hallo welt" }
createFileAndCommit("hello") { content = """
def fac(n):
if n == 1:
return 1
else:
return n*fac(n-1)

def demo():
print("Demo")
print(f'fac(6) = {fac(6)}')

if __name__ == '__main__':
demo()

""".trimIndent()
}

startBranch("feature") {
editAndCommit("hello", "Uppercase hello") { content = "Hallo Welt" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fun buildGitUebungen() {
}

thema("Weihnachten") {
rebasingSandbox()
gitmas()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ fun main() {
thema("beispiel") {

// halloWelt()
// rebasingSandbox()
rebasingSandbox()
//repositoryUntersuchen()
reverting()
// reverting()
// commitsErstellen()
// staging()
// cloning()
Expand Down