Advertisement
JOHNYTHEWINNER

C19-increasing

Mar 24th, 2020
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. total_sick_people=0
  2. weekly_sick=""
  3. for day in range(7):
  4.     print(f"Day {day + 1}: ", end="")
  5.     daily_sick=int(input())
  6.     if day==0:
  7.         first_day_sick_people=daily_sick
  8.     total_sick_people+=daily_sick
  9.     temporary_day=str(daily_sick)
  10.     weekly_sick+=temporary_day
  11. spaces_counter=0
  12. for day in range(7):
  13.     sick_people_today=int(weekly_sick[day])
  14.     print(f"Day {day + 1}: ", end="")
  15.     for spaces in range(sick_people_today):
  16.         print("*",end="")
  17.     print()
  18. print(f"Total sick people: {total_sick_people}")
  19. percents=total_sick_people/first_day_sick_people*100
  20. print(f"Total increasing from day 1 to 7: {(percents):.2f}%.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement