├── code1.py ├── code2.py ├── code3.py └── code4.py /code1.py: -------------------------------------------------------------------------------- 1 | a=int(input()) 2 | b=int(input()) 3 | print(a+b) 4 | -------------------------------------------------------------------------------- /code2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johfrit/Python/51a6640c4c66a6dc46f93182643a8eb1d057ec54/code2.py -------------------------------------------------------------------------------- /code3.py: -------------------------------------------------------------------------------- 1 | n, index= map(int, input().split()) 2 | array= list(map(int, input().split())) 3 | paid=int(input()) 4 | sum=0 5 | for i in array: 6 | if i==array[index]: 7 | continue 8 | else: 9 | sum+=i 10 | share=sum//2 11 | if share==paid: 12 | print("Bon Appetit") 13 | else: 14 | print(paid-share) 15 | -------------------------------------------------------------------------------- /code4.py: -------------------------------------------------------------------------------- 1 | count=0 2 | s=input() 3 | leng=len(s) 4 | for i in range(0,leng,3): 5 | if s[i]!='S': 6 | count+=1 7 | if s[i+1]!='O': 8 | count+=1 9 | if s[i+2]!='S': 10 | count+=1 11 | print(count) 12 | 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------