You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flu season is upon us and the number of people getting sick is growing.
8
+
9
+
On day 1, there was only 6 people had the flu
10
+
On day 2, it jumped to 20.
11
+
On day 3, there were 75
12
+
13
+
Every day since, the number of people who have the flu is equal to the last 3 days combined
14
+
You will make a program that will ask the user for what day they want a count of people with the flu for. Then display the amount. You must use recursion to solve the calculation of infected for a given day. Assume the user will input a valid day.
15
+
16
+
day people
17
+
1 = 6
18
+
2 = 20
19
+
3 = 75
20
+
4 = 75 + 20 + 6
21
+
4 = (4 - 1) + (4 - 2) + (4 - 3)
22
+
x = (x - 3) + (x - 2) + (x - 1)
23
+
24
+
25
+
'''
26
+
27
+
28
+
29
+
defmain():
30
+
print("OUTBREAK!")
31
+
days=input("What day do you want a sick count for?: ")
0 commit comments