0% found this document useful (0 votes)
9 views3 pages

Dwayne New

The document is a test review for a Computer Science 8 class, focusing on identifying and correcting errors in programming code. It includes specific tasks such as correcting case sensitivity, ensuring proper data types, and formatting print statements. Additionally, it requires students to analyze code behavior and write a sample code for employee information output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Dwayne New

The document is a test review for a Computer Science 8 class, focusing on identifying and correcting errors in programming code. It includes specific tasks such as correcting case sensitivity, ensuring proper data types, and formatting print statements. Additionally, it requires students to analyze code behavior and write a sample code for employee information output.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

TEST REVIEW

Computer Science 8

NAME: __________________________________​ DATE: ___________________________

1.​ Find the error in the program and briefly describe how to correct it.

total has to be = to price1 + price2 because it is case sensitive

2.​ Find the error in the program and briefly describe how to correct it.

age is a number so it has to be float(input(..))

3.​ Find the error in the program and briefly describe how to correct it.

there isnt a comma in print it has to be print("....:",radius)


4.​ Analyze the codes and discuss in the box what is happening in the
program. Give as many details as possible.

if you input 5 and 10 it will print 5.0 and 10.0 after that it will switch them and print 10.0
and 5.0

5.​ In the space below, write the code for this output:

name = "Frank" # Predefined name


position = input("Enter employee position: ")
salary = float(input("Enter employee salary: "))

print("\nEmployee Information:")
print("Name:", name)
print("Position:", position)
print("Salary: ${:.2f}".format(salary))

You might also like