Select Git revision
exercise1.py
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
exercise1.py 620 B
def mysum(a,b): #!f Implement the sum-function here #!s=b
"""
Return the sum of a and b
"""
return a+b #!s=b
#!s=a
def print_information(s):
print("s is", s) #!b
print("s printed twice", s, s) #!b Print s once and twice.
print("s printed three times", s, s, s)
#!s=a
# Let's both capture output and also typeset it is an interactive python session.
print("Hello world") #!i
for j in range(3): #!o
print(f"{j=}") #!o
print("Goodbuuy world") #!i
# Cut a single line and put it in the 'b' snippet.
3 * 45 #!s=b #!s=b
if __name__ == "__main__":
mysum(2,2)
print_information("Cat")