Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having trouble with finding one of the errors.. please help!Identify errors and fix the code. There are 4 different errors in the following code

I'm having trouble with finding one of the errors.. please help!Identify errors and fix the code.\ There are 4 different errors in the following code segment; there may be syntax and logic errors. Design some simple\ test cases to find the logic errors. Find the 4 errors and correct the code to work.\ IDEAL_CREDIT_SCORE

=720

\ userScore

=

int(input("Please enter your credit score: "))\ housePrice

=

int(input("Please enter the price of the house: "))\ if userScore

=>

IDEAL_CREDIT_SCORE:\ downPayment

=0.1**

housePrice\ else if userScore " 600 ":\ downPayment

=0.2**

housePrice\ else:\ downPayment

=0.3**

housePrice\ print("Your down payment is:

${}

".format(downPayment))

image text in transcribed
Identify errors and fix the code. There are 4 different errors in the following code segment; there may be syntax and logic errors. Design some simple test cases to find the logic errors. Find the 4 errors and correct the code to work. IDEAL_CREDIT_SCORE =720 userScore = int(input("Please enter your credit score: ")) housePrice = int(input("Please enter the price of the house: ")) if userScore IDEAL_CREDIT_SCORE: downPayment =0.1 housePrice else if userScore "600": downPayment =0.2 housePrice else: downPayment =0.3 housePrice print("Your down payment is: ${}".format(downPayment))

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago