Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is wrong with line 9? I am not sure what I'm doing wrong or not doing. What should I be thinking about when I'm

What is wrong with line 9? I am not sure what I'm doing wrong or not doing. What should I be thinking about when I'm trying to debug?

image text in transcribed
C Codio Project File Edit Find View Tools Education Help Node version Project Index (static) Configure.. BFEDELL fix2.py 4. 2. Fix chall.. VOUAWNI # Input from the command line Collapse Fixing Errors import sys A = sys . argv[1] B = sys . argv [2] C = sys . argv [3] 4. 2. Fix challenge 2 Note: Your arguments are strings unless they are converted into some other type. In 8 # Your code goes here num = ( A * (B + C/3) ) this challenge, we are using decimals ( float ) rather than integers ( int ) for our 10 type. So, you will need to tell Python to treat the variables as floating point decimal 11 float (A) 12 float ( B ) numbers by putting float (variable) in at the correct times. 13 float (C) 14 15 # Outputs Fix the broken code on the left. 16 print (num) Check It! X LAST RUN on 8/27/2020, 10:45:03 PM Program Output Traceback (most recent call last): File "fix2.py", line 9, in num = (A * (B + C/3)) TypeError: unsupported operand type(s) for /: str' and 'int' Program Failed for Input: 3 4 7 Expected Output: 19.0 Your Program Output: Next 54% (9:21) Python Type here to search 22:45 8/27/2020

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

13 Marketing communications planning and plans 288

Answered: 1 week ago