Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

when i run it with the original lines, everything runs fine, but when the system decides to modify the first few lines to see if

image text in transcribed

when i run it with the original lines, everything runs fine, but when the system decides to modify the first few lines to see if all possibilites are correct, I recieve this error. Thanks

1 phase = "Full" 2 distance228000 [Executed at: Sun Feb 25 21:19:3 8 PST 2018] 3 date 31 4 eclipse True 6 #You may modify the lines of code above, but don't move them! We found a few things wrong with your code. The first one is sho wn below, and the rest can be fo und in full_results.txt in the d ropdown in the top left: 7 #When you submit your code, we'll change these lines to 8 #as sign different values to the variables 10 #There are (at least) three special types of full moons: 11 # 12 # -Super Moon: the full moon occurs when the moon is at its 13 # closest approach to earth (less than 230, 000km away) 14 # -Blue Moon: the second full moon in a calendar month. In 15 # other words, any full moon on the 29th, 30th, or 31st of 16 # a month. 17 # -Blood Moon: a lunar eclipse during a full moon. 18# 19 #lrite a program that will print out the type of moon 20 #"Full Moon", "Super Moon", "Blue Moon", "Blood Moon", based 21 #on the values of the variables above. Note that for the moon 22 #to be any of these special kinds of moons, it must also be 23 #full We tested your code with eclipse True, distance- 235000, phas e "Full", date 29, we expect ed your code to print this: Blue Blood Moon However, it printed this: NameError: name 'supermoon' is n ot defined 24 #Note, though, that multiple modifiers can be true at the same 25 #time. We could have a Super Blue Moon, a Blue Blood Moon, or 26 #even a Super Blue Blood Moon 27 #Always print those modifiers in that orde 28 #special modifiers is present, do not include the word "Full" 29 #If none of them are present, but the moon is Full, then print 30 #"Full Moon". If none of them are present at all, print "Moon". 31 if distance230000 and phase-"Full". 32 33 if(date-29 or date=30 or date-31) and phase-"Full": 34 35 if eclipse and phase"Full": 36 r. If any of these supermoon "Super bluemoon-"Blue" bloodmoon-"Blood" 37 if phase""Full"and(distance >#230eee) and date29 and (not eclipse): 38 print( "Full Moon) 39 if not (phase"Full): 40 41 print (str(supermoon),str(bluemoon),str(bloodmoon)"Moon" .. print (Moon)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions