Getting error “Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str”

I have an assignment for creating cost for a sign. I have done everything for the assignment, and the code even runs perfectly the way it wants it. however, it keeps giving me the error “Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str” which is slicing my grade by 50%.

This is my code. It works fine. For example, it wants the price of a gold text sign, with 8 letters and pine to be 62$ which is what the price ends up being by the end of the program.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code># Initialize variables here.
charge = 0
num_chars = 8
color = "gold"
wood_type = "oak"
minChars = 5
costChars = 4
# Charge for this sign.
# Number of characters.
print("The first five letters are included in the minimum charge, but each individual character afterwards is an additional 4$")
num_chars = int(input("Enter how many characters you will have on the sign: "))
if num_chars > minChars:
charge = (num_chars - minChars) * costChars
# Color of characters.
color = input("Do you wan to pay 15$ additional for gold lettering or black and white: ")
if color == "gold":
charge = charge + 15
elif color == "black and white":
charge
# Type of wood.
wood_type = input("Do you wan to pay 20$ additional oak or pine: ")
if wood_type == "oak":
charge = charge + 20
elif wood_type == "pine":
charge
# Write assignment and if statements here as appropriate.
# Output Charge for this sign.
charge = charge + 35
print(f"The charge for this sign is ${charge:.2f}")`
</code>
<code># Initialize variables here. charge = 0 num_chars = 8 color = "gold" wood_type = "oak" minChars = 5 costChars = 4 # Charge for this sign. # Number of characters. print("The first five letters are included in the minimum charge, but each individual character afterwards is an additional 4$") num_chars = int(input("Enter how many characters you will have on the sign: ")) if num_chars > minChars: charge = (num_chars - minChars) * costChars # Color of characters. color = input("Do you wan to pay 15$ additional for gold lettering or black and white: ") if color == "gold": charge = charge + 15 elif color == "black and white": charge # Type of wood. wood_type = input("Do you wan to pay 20$ additional oak or pine: ") if wood_type == "oak": charge = charge + 20 elif wood_type == "pine": charge # Write assignment and if statements here as appropriate. # Output Charge for this sign. charge = charge + 35 print(f"The charge for this sign is ${charge:.2f}")` </code>
# Initialize variables here.
charge = 0
num_chars = 8
color = "gold"
wood_type = "oak"
minChars = 5
costChars = 4

# Charge for this sign.

# Number of characters.
print("The first five letters are included in the minimum charge, but each individual character afterwards is an additional 4$")
num_chars = int(input("Enter how many characters you will have on the sign: "))
if num_chars > minChars:
    charge = (num_chars - minChars) * costChars
# Color of characters.
color = input("Do you wan to pay 15$ additional for gold lettering or black and white: ")
if color == "gold":
    charge = charge + 15
elif color == "black and white":
    charge
# Type of wood.
wood_type = input("Do you wan to pay 20$ additional oak or pine: ")
if wood_type == "oak":
    charge = charge + 20
elif wood_type == "pine":
    charge
# Write assignment and if statements here as appropriate.

# Output Charge for this sign.
charge = charge + 35
print(f"The charge for this sign is ${charge:.2f}")`

This is the output containing the errors:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Status: FAILED!
Check: 1
Test: Black and white, 5 letter, on pine (minimum charge).
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443145
Status: FAILED!
Check: 2
Test: Gold leaf, 10 letter, on oak.
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443463
Status: FAILED!
Check: 3
Test: Gold leaf, 8 letter, on pine.
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443735
</code>
<code>Status: FAILED! Check: 1 Test: Black and white, 5 letter, on pine (minimum charge). Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str. Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str. Timestamp: 2024-04-27 20:20:03.443145 Status: FAILED! Check: 2 Test: Gold leaf, 10 letter, on oak. Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str. Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str. Timestamp: 2024-04-27 20:20:03.443463 Status: FAILED! Check: 3 Test: Gold leaf, 8 letter, on pine. Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str. Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str. Timestamp: 2024-04-27 20:20:03.443735 </code>
Status: FAILED!
Check: 1
Test: Black and white, 5 letter, on pine (minimum charge).
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443145

Status: FAILED!
Check: 2
Test: Gold leaf, 10 letter, on oak.
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443463

Status: FAILED!
Check: 3
Test: Gold leaf, 8 letter, on pine.
Reason: Unable to determine color type. Type mismatch: Cannot replace Call with str.
Error : ValueError - Unable to determine color type. Type mismatch: Cannot replace Call with str.
Timestamp: 2024-04-27 20:20:03.443735

This is the assignment: Assignment

New contributor

liam ruddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

5

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật