Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is wrong? #!/usr/bin/env python3 def convert_temp(scale=None, source_temp=None): if scale == F: return 'C', (source_temp - 32.0) * (5.0/9.0) elif scale == C: return 'F',

What is wrong? #!/usr/bin/env python3 def convert_temp(scale=None, source_temp=None): if scale == "F": return 'C', (source_temp - 32.0) * (5.0/9.0) elif scale == "C": return 'F', (source_temp * (9.0/5.0)) + 32.0 else: print("Needs to be (F) or (C)!") scale = input("Select (F) or (C): " ) source_temp = int(input("What is the temperature: " )) s, m = convert_temp(scale, source_temp) print(source_temp, "degrees", scale, "is", m, "degrees", s) I get file "...", line 12 in scale = inoput( "select For C:) "F or C is nmot defined

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