Advertisement
Guest User

03. Online Education

a guest
May 3rd, 2018
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. site=0
  2. line=0
  3. for i in range(3):
  4.     s=str(input())
  5.     people=int(input())
  6.     if s=="online":
  7.         line+=people
  8.     else:
  9.         site+=people
  10. if site > 600:
  11.     line+=(site-600)
  12.     site=600
  13. print("Online students: "+ str(line))
  14. print("Onsite students: " + str(site))
  15. print("Total students: "+ str(line+site))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement