Write a program that consists of the code below. a = 1 b = "One" c = 5.2 d = "5.2" e = "3" aa = "Number" + a bb = "Number" + b cc = "Number" + c dd = "Number" + d ee = "Number" + e print (aa) print (bb) print (cc) print (dd) print (ee) aa = 10 + a bb = 10 + b cc = 10 + c dd = 10 + d ee = 10 + e print (aa) print (bb) print (cc) print (dd) print (ee) Run the program. Issues This program does not work fully. 1. Describe the error. 2. What do they depend on? Solve the problems, but you have some limitations. You may only change what is assigned to aa, bb, cc, dd and ee. 2. As far as possible, the calculations should work. (10+ "One" does not work, of course.) If you later change the values (but not type) of the assignments to a, b, c, d and e, the program should still work as expected.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a program that consists of the code below.
a = 1
b = "One"
c = 5.2
d = "5.2"
e = "3"
aa = "Number" + a
bb = "Number" + b
cc = "Number" + c
dd = "Number" + d
ee = "Number" + e
print (aa)
print (bb)
print (cc)
print (dd)
print (ee)
aa = 10 + a
bb = 10 + b
cc = 10 + c
dd = 10 + d
ee = 10 + e
print (aa)
print (bb)
print (cc)
print (dd)
print (ee)


Run the program.
Issues
This program does not work fully.
1. Describe the error.
2. What do they depend on?
Solve the problems, but you have some limitations.
You may only change what is assigned to aa, bb, cc, dd and ee.
2. As far as possible, the calculations should work. (10+ "One" does not work, of course.)
If you later change the values (but not type) of the assignments to a, b, c, d and e, the program should still work as expected.

Expert Solution
Step 1

Objective: According to the question, we need to rectify some errors and state the reasons for having errors in the given program.

Programming Language: Python 

1. In computer programs, the error is considered as an illegal operation that violates the programming language rules or syntax. Thus, the respective program with error can not be executed. These are mainly termed as compile-time errors while in some cases, there exist runtime errors occur during the execution of the program and produce wrong or abnormal output.

2. Errors are dependent on specifications or syntax stated in programming languages. Besides, the ideas that developers use in making the application may also be a reason for getting runtime-errors. For example, suppose, an operation requires adding two numbers and the programmer divides in the program. This wrong understanding will give the wrong result.

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY