3. Given the following Python code. Please describe the programming errors in the code and provide the corrections required to fix the program. Please include the line numbers for each correction. Hint: There are 3 errors in the code. bad program.py O == 18 19 20 21 22 23 24 24 25 26 27 28 29 30 31 32 Program Description: This program generates a random license place for a user specified car and store the year, make, model, and license plate in a dictionary Author: Faris Hawamdeh #Prompt the user to enter the year, make, and model of their vehicle year= int(input('Please enter the model year of your vehicle: ')) make= int(input('Please enter the maker of your vehicle: ')) model input('Please enter the model of your vehicle: ') # Generate the 3-Letter prefix: Can be A-Z letter_a = chr (random.randint (65, 90)) letter_b = chr (random.randint (65, 90)) letter_c= chr(random.randint (65, 90)) # Generate the 4-digit number for the License plate digits random.randint (1000, 9999) license_plate letter_a+ letter_b+ letter_c + digits Ecar = 'Year': year, 'Make': make, 'Model": model, 'Plate': license plate ) print (f'The license plate for your (car["Year"]} (car["Make"]) (car["Model"]) is (car["Plate"]}')

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Alert dont submit AI generated answer.

bad program.py O
123456700 O
8
3. Given the following Python code. Please describe the programming errors in the code and
provide the corrections required to fix the program. Please include the line numbers for each
correction. Hint: There are 3 errors in the code.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Program Description:
This program generates a random license place for a
the year, make, model, and license plate in a dictionary
Author: Faris Hawamdeh
AS E AV
#Prompt the user to enter the year, make, and model of their vehicle
year= int(input ('Please enter the model year of your vehicle: '))
make = int(input ('Please enter the maker of your vehicle: '))
model =
input('Please enter the model of your vehicle: ')
# Generate the 3-Letter prefix: Can be A-Z
letter_a= chr(random.randint (65, 90))
letter_b= chr(random.randint (65, 90))
letter_c= chr(random.randint (65, 90))
ser specified car and store
#Generate the 4-digit number for the License plate
digits = random.randint (1000, 9999)
license plateletter_a+ letter_b+ letter_c + digits
Ecar =
'Year': year,
'Make': make,
'Model': model,
'Plate': license_plate
print (f'The license plate for your {car["Year"]} {car["Make"]) {car["Model"]) is (car["Plate"]}')
Transcribed Image Text:bad program.py O 123456700 O 8 3. Given the following Python code. Please describe the programming errors in the code and provide the corrections required to fix the program. Please include the line numbers for each correction. Hint: There are 3 errors in the code. 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Program Description: This program generates a random license place for a the year, make, model, and license plate in a dictionary Author: Faris Hawamdeh AS E AV #Prompt the user to enter the year, make, and model of their vehicle year= int(input ('Please enter the model year of your vehicle: ')) make = int(input ('Please enter the maker of your vehicle: ')) model = input('Please enter the model of your vehicle: ') # Generate the 3-Letter prefix: Can be A-Z letter_a= chr(random.randint (65, 90)) letter_b= chr(random.randint (65, 90)) letter_c= chr(random.randint (65, 90)) ser specified car and store #Generate the 4-digit number for the License plate digits = random.randint (1000, 9999) license plateletter_a+ letter_b+ letter_c + digits Ecar = 'Year': year, 'Make': make, 'Model': model, 'Plate': license_plate print (f'The license plate for your {car["Year"]} {car["Make"]) {car["Model"]) is (car["Plate"]}')
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Introduction to Coding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education