interactiveTest: partially complete

(evaluated at 20210628@22:01:15)

Rubric report

Overall evaluation: partially complete

You accomplished 6.5 (at least 4.5) of the 9 core goals.

~
partial Style Requirements
Checks regarding the raw text of your code file and how it is organized stylistically (e.g., how many characters are in a line of code, or how many comments there are).
Accomplished some of the core style goals.
~
partial Core goals
Complete all core goals for core credit. Get partial credit for completing at least half, and more partial credit for completing at least 90%.
Accomplished 1.5 of 2 goals.
accomplished Do not ignore the results of any fruitful function calls.
According to the "Don't waste fruit" principle, every place you call a fruitful function (built-in or custom) you must store the result in a variable, or that function call must be part of a larger expression that uses its return value.
All calls to fruitful functions in your code correctly made use of their results.
~
partial Do not create any variables that you never make use of.
According to the "Don't waste boxes" principle, every time you create a variable (using = or by defining a parameter for a function) you must also later use that variable as part of another expression. If you need to create a variable that you won't use, it must have the name _, but you should only do this if absolutely necessary.
Your code created 2 variables which it did not make use of: Found the following variables that were never used:
  1. In the global scope, found:
    1. Variable dogCount on line(s) 21
    2. Variable name on line(s) 14
~
partial Procedure Requirements
Code checks which require that your code is written in a certain way, regardless of what happens when it runs (e.g., how many lines of code call a certain function).
Accomplished some of the core procedure goals.
~
partial Core goals
Complete all core goals for core credit. Get partial credit for completing at least half, and more partial credit for completing at least 90%.
Accomplished 4 of 5 goals.
accomplished No errors loading code.
Your code should be able to be loaded without errors. Run your code before submitting it to make sure this is true.
There weren't any parsing errors.
accomplished Call input
Call input in exactly 4 places.
Expected exactly 4 calls to input, found 4.
Notes
accomplished Call int
Call int in at least once place.
Expected at least 1 call to int, found 1.
Notes
  • Found on line(s): 21
accomplished Call float
Call float in at least once place.
Expected at least 1 call to float, found 2.
Notes
  • Found on line(s): 22, 23
failed Use a multiplication by 7
Use 7 * _ in at least once place.
Expected at least 1 multiplication by 7, found 0.
failed Extra goals
Complete all extra goals in addition to the core goals for a perfect score.
Accomplished 0 of 1 goal.
failed Use a multiplication by 7
Use 7 * _ in exactly one place.
Expected exactly 1 multiplication by 7, found 0.
~
partial Behavior Requirements
Behavior tests that run your code and check what inputs it requests from and what outputs it displays to the user (e.g., what is printed given certain typed inputs).
Accomplished some of the core behavior goals.
~
partial Core goals
Complete all core goals for core credit. Get partial credit for completing at least half, and more partial credit for completing at least 90%.
Accomplished 1 of 2 goals.
~
partial Your file prints the correct output
The output printed when your entire file is run must match the solution output.
Strings are somewhat similar.

Actual output
Corresponding lines (if any) in expected output
f1What is your name? Valentinaf1What is your name? Valentina
2How many dogs do you have? 32How many dogs do you have? 3
3On average, how much does each dog eat per day (in cups)? 23On average, how much does each dog eat per day (in cups)? 2
4On average, how much does one cup of dog food weigh (in lbs)? 14On average, how much does one cup of dog food weigh (in lbs)? 1
t5 t5Feeding information for Valentina:
6Traceback (most recent call last):6Your dog(s) eat 42.0 lbs of dog food every week.
7  File "<task>potluck/harness.py", line 425, in capturing_payload
8    result = payload(context)
9  File "<task>potluck/harness.py", line 129, in payload
10    module = load.create_module_from_code(node, full_name)
11  File "<task>potluck/load.py", line 134, in create_module_from_code
12    exec(bytecode, module.__dict__, module.__dict__)
13  File "<task>test_interactive.py", line 25, in <module>
14TypeError: can't multiply sequence by non-int of type 'float'
~
partial Your file prints the correct output
The output printed when your entire file is run must match the solution output.
Strings are somewhat similar.

Actual output
Corresponding lines (if any) in expected output
f1What is your name? Hamadf1What is your name? Hamad
2How many dogs do you have? 12How many dogs do you have? 1
3On average, how much does each dog eat per day (in cups)? 2.53On average, how much does each dog eat per day (in cups)? 2.5
4On average, how much does one cup of dog food weigh (in lbs)? 0.754On average, how much does one cup of dog food weigh (in lbs)? 0.75
t5 t5Feeding information for Hamad:
6Traceback (most recent call last):6Your dog(s) eat 13.12 lbs of dog food every week.
7  File "<task>potluck/harness.py", line 425, in capturing_payload
8    result = payload(context)
9  File "<task>potluck/harness.py", line 129, in payload
10    module = load.create_module_from_code(node, full_name)
11  File "<task>potluck/load.py", line 134, in create_module_from_code
12    exec(bytecode, module.__dict__, module.__dict__)
13  File "<task>test_interactive.py", line 25, in <module>
14TypeError: can't multiply sequence by non-int of type 'float'
~
partial Extra goals
Complete all extra goals in addition to the core goals for a perfect score.
Accomplished 1 of 2 goals.
~
partial Your file prints the correct output
The output printed when your entire file is run must match the solution output.
Strings are somewhat similar.

Actual output
Corresponding lines (if any) in expected output
f1What is your name? Wenyuf1What is your name? Wenyu
2How many dogs do you have? 12How many dogs do you have? 1
3On average, how much does each dog eat per day (in cups)? 1.192013On average, how much does each dog eat per day (in cups)? 1.19201
4On average, how much does one cup of dog food weigh (in lbs)? 0.58424On average, how much does one cup of dog food weigh (in lbs)? 0.5842
t5 t5Feeding information for Wenyu:
6Traceback (most recent call last):6Your dog(s) eat 4.87 lbs of dog food every week.
7  File "<task>potluck/harness.py", line 425, in capturing_payload
8    result = payload(context)
9  File "<task>potluck/harness.py", line 129, in payload
10    module = load.create_module_from_code(node, full_name)
11  File "<task>potluck/load.py", line 134, in create_module_from_code
12    exec(bytecode, module.__dict__, module.__dict__)
13  File "<task>test_interactive.py", line 25, in <module>
14TypeError: can't multiply sequence by non-int of type 'float'
~
partial Your file prints the correct output
The output printed when your entire file is run must match the solution output.
Strings are somewhat similar.

Actual output
Corresponding lines (if any) in expected output
f1What is your name? Paolof1What is your name? Paolo
2How many dogs do you have? 02How many dogs do you have? 0
3On average, how much does each dog eat per day (in cups)? 03On average, how much does each dog eat per day (in cups)? 0
4On average, how much does one cup of dog food weigh (in lbs)? 04On average, how much does one cup of dog food weigh (in lbs)? 0
t5 t5Feeding information for Paolo:
6Traceback (most recent call last):6Your dog(s) eat 0.0 lbs of dog food every week.
7  File "<task>potluck/harness.py", line 425, in capturing_payload
8    result = payload(context)
9  File "<task>potluck/harness.py", line 129, in payload
10    module = load.create_module_from_code(node, full_name)
11  File "<task>potluck/load.py", line 134, in create_module_from_code
12    exec(bytecode, module.__dict__, module.__dict__)
13  File "<task>test_interactive.py", line 25, in <module>
14TypeError: can't multiply sequence by non-int of type 'float'

Your code

File interactive.py

1  """
2  interactive.py
3  
4  Your name: Peter Mawhorter
5  Your username: pmwh
6  Submission date: 2021-6-28
7  """
8  
9  # PART 1: Get Input
10  # Gather input from the user about time spent on different categories of
11  # activities during each week. Since inputs are "strings", convert them
12  # immediately to int or float values. There should be a total of 6 questions.
13  
14  name = input('What is your name? ')
15  dogs = input('How many dogs do you have? ')
16  diet = input('On average, how much does each dog eat per day (in cups)? ')
17  density = input(
18      'On average, how much does one cup of dog food weigh (in lbs)? '
19  )
20  
21  dogCount = int(dogs)
22  dietCups = float(diet)
23  densityLbs = float(density)
24  
25  lbsPerWeek = dietCups * densityLbs * dogs
26  
27  
28  print(
29      "Your dog(s) eat "
30    + str(round(lbsPerWeek, 2))
31    + "lbs of dog food every week."
32  )
33  
34  

Test results

File 'interactive.py'
We will evaluate your submitted file 'interactive.py'.
Evaluating 'interactive.py'
Code in the target file
We parsed the code in the target file and paidattention to how it was written.
The code for 'interactive.py' (shown elsewhere).
Program output ('Valentina' input)
We ran your program with some example inputs, and observed what it printed.
We ran your submitted code
Testing details:
  • Will be terminated if it takes longer than 5s.
  • Printed output and error messages will be recorded.
  • The following inputs will be provided:
    • 'Valentina'
    • '3'
    • '2'
    • '1'
Program output ('Hamad' input)
We ran your program with some example inputs, and observed what it printed.
We ran your submitted code
Testing details:
  • Will be terminated if it takes longer than 5s.
  • Printed output and error messages will be recorded.
  • The following inputs will be provided:
    • 'Hamad'
    • '1'
    • '2.5'
    • '0.75'
Program output ('Wenyu' input)
We ran your program with some example inputs, and observed what it printed.
We ran your submitted code
Testing details:
  • Will be terminated if it takes longer than 5s.
  • Printed output and error messages will be recorded.
  • The following inputs will be provided:
    • 'Wenyu'
    • '1'
    • '1.19201'
    • '0.5842'
Program output ('Paolo' input)
We ran your program with some example inputs, and observed what it printed.
We ran your submitted code
Testing details:
  • Will be terminated if it takes longer than 5s.
  • Printed output and error messages will be recorded.
  • The following inputs will be provided:
    • 'Paolo'
    • '0'
    • '0'
    • '0'