You need to write a program that takes an input string that contains Alex's weekly expenses and returns how much he's spent this week. Pay attention to the input and output format in the example.
Preconditions and postconditions
Let's calculate the expenses
Report a typo
Sample Input 1:
2 meals $20, groceries $120, 1 month rent $500Sample Output 1:
This week you have spent: 640 dollarsWrite a program in Python 3
import re
string = input()
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.