Trace through what values are stored in each variable as the code executes and what values will be displayed. Assume the user enters Nassau, 10 in that order. county = input ('Enter the county you live in: ') credits = int (input ('Enter the number of credits you are taking: ')) if county == 'Nassau' and credits >= 12: tuition = 2000 elif county == 'Suffolk': tuition = 3990 elif credits >= 10: tuition = credits * 160 else: tuition = credits * 30 print (tuition) county credits tuition output

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
Trace through what values are stored in each variable as the code executes and what values will be displayed. Assume the user enters Nassau, 10 in that order.
county
input ('Enter the county you live in: ')
credits
int(input ('Enter the number of credits you are taking: '))
if county
'Nassau' and credits >= 12:
==
tuition = 2000
elif county ==
'Suffolk':
tuition
3990
elif credits >= 10:
tuition = credits
* 160
else:
tuition = credits * 30
print (tuition)
county
credits
tuition
output
Transcribed Image Text:Trace through what values are stored in each variable as the code executes and what values will be displayed. Assume the user enters Nassau, 10 in that order. county input ('Enter the county you live in: ') credits int(input ('Enter the number of credits you are taking: ')) if county 'Nassau' and credits >= 12: == tuition = 2000 elif county == 'Suffolk': tuition 3990 elif credits >= 10: tuition = credits * 160 else: tuition = credits * 30 print (tuition) county credits tuition output
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
C-string
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage