diff --git a/questions/chunga.md b/questions/chunga.md new file mode 100644 index 0000000..0880015 --- /dev/null +++ b/questions/chunga.md @@ -0,0 +1,52 @@ +# Can I Get a New Phone Now? + +## With the money I have made from odd jobs, can I finally get a new phone? + +# My current phone is all kinds of busted. The technology I currently have seems near illegal to be selling in the 21st century. I worked a couple odd jobs and now I hope to purchase the newest ePhone for the low price of $1400. Can I afford it? + +# We will need to compile the appropriate payouts and add them together to find out if it is greater than that of the newest ePhone. Get a paper and make note! I babysat 5 times, cat sitted once, cleaned 2 times and did taxes 3 times. + +#Help a girl out. + +## Input + +```python +ephone = 1400 + +jobs = [babysitting, cat sitting, cleaning, tax filing] +babysitting = 100 +catsitting = 200 +cleaning = 50 +taxes = 90 + +``` + +# Now, we will specify how many times each job was done. We multiply this by the pay for each type of job. Then we will add them together. If this value is enough to purchase the phone, print "new phone!" and if not, print "just forget it". + +Therefore, your function should return: + +```python +# print(result) +``` + +Here are some criteria for marking someone's code: + +- Correctness: Does the code produce correct results for all test cases? +- Readability: Is the code easy to read and understand? +- Efficiency: Does the code run efficiently? +- Style: Does the code follow good coding style and conventions? + +Here is a sample solution in Python: + +```python +def can_i_get_it(babysitting, catsitting, cleaning, tax :int) -> str: + savings = 5(jobs[0]) + jobs[1] + 2(jobs[2]) + 3(jobs[3]) + + if savings >= ephone: + result = "new phone!" + else: + result = "just forget it" + return can_i_get_it +can_i_get_it () +print (result) +``` \ No newline at end of file