Nana is evaluating four of her student programs. The program is asked to output letter values from numeric values. The numerical value is in the range of 0.100 and the letter value is between A. B. C. or D. These four programs have been tested by Nana with an input value of = 6o. As a result, the four programs output "D" as if the programs were correct. However, ONE OF THE PROGRAMS BELOW IS WRONG! which program is it? 100 A 91 81 - 90 →B 71 - 80 → C 0 - 70 → D A if (num>90) : print ("Grade A") elit (num>80) : print ("Grade B") elif (num>70) : print ("Grade C") if (num>90): print ("Grade A") if (num>80 and numc=90): print ("Grade B") if (num>70 and numc-80): print ("Grade C") else: B else: print ("Grade D"} print ("Grade D") C it (num<-70): print ("Grade D") elif (numc-80) : print ("Grade C") elif (num<-90) : print ("Grade B") else: it (num<-90) : if (numc80) : if (num<=70): print ("Grade D") else: print ("Grade C") else: print ("Grade B") else: print ("Grade A") print ("Grado A")

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
icon
Concept explainers
Question
| 24. Nana is evaluating four of her student programs. The program is asked to output letter
values from numeric values. The numerical value is in the range of .100 and the letter
value is between A, B, C, or D. These four programs have been tested by Nana with an
input value of = 60. As a result, the four programs output "D" as if the programs were
correct. However, ONE OF THE PROGRAMS BELOW IS WRONG! which program is it?
100 A
91
81 - 90 →B
71 - 80 →C
0 - 70 → D
Aif (num> 90):
print ("Grade A")
elif (num>80):
print ("Grade B")
elif (num> 70):
print ("Grade C")
else:
if (num>90) :
print ("Grade A")
if (num>80 and num<=90):
print ("Grade B")
if (num>70 and num<-80):
print ("Grade C")
else:
B
print ("Grade D")
print ("Grade D")
Cif (num<-70):
print ("Grade D")
elif (num<=80):
print ("Grade C")
elif (num<-90):
print ("Grade B")
else:
if (num<-90) :
If (num<=80) :
if (num<=70) :
print ("Grade D")
else:
print ("Grade C")
else:
D
print ("Grade A")
print ("Grade B")
else:
print ("Grade A")
Transcribed Image Text:| 24. Nana is evaluating four of her student programs. The program is asked to output letter values from numeric values. The numerical value is in the range of .100 and the letter value is between A, B, C, or D. These four programs have been tested by Nana with an input value of = 60. As a result, the four programs output "D" as if the programs were correct. However, ONE OF THE PROGRAMS BELOW IS WRONG! which program is it? 100 A 91 81 - 90 →B 71 - 80 →C 0 - 70 → D Aif (num> 90): print ("Grade A") elif (num>80): print ("Grade B") elif (num> 70): print ("Grade C") else: if (num>90) : print ("Grade A") if (num>80 and num<=90): print ("Grade B") if (num>70 and num<-80): print ("Grade C") else: B print ("Grade D") print ("Grade D") Cif (num<-70): print ("Grade D") elif (num<=80): print ("Grade C") elif (num<-90): print ("Grade B") else: if (num<-90) : If (num<=80) : if (num<=70) : print ("Grade D") else: print ("Grade C") else: D print ("Grade A") print ("Grade B") else: print ("Grade A")
Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
Operators
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.
Similar questions
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