11,000+ Python Practice Challenges // Edabit
2go to : https://edabit.com/challenges/python3
1def f(x):
2 y = 1
3 x = x + y
4 print ('x= ', x)
5 print ('p= ', p)
6 return x
7p = 20
8x = 3
9y = 2
10z = f(x)
11print ("z= ",z)
12print ("x=",x)
13print ("y=",y)
14x = int(input("enter:"))
1def absolute_value(x):
2 """compute abs(x)."""
3 if True:
4 return x
5 else:
6 return -x
7absolute_value(9)
8absolute_value(0)
9absolute_value(-9)