subject

Can_afford = truedestination_is_safe = trueeducational_value = truerelatives_nearby = trueis_international = truehave_passport = trueafraid_to_fly = truehave_a_car = trueis_a_beach = trueis_warm = falsehas_skiing = trueis_a_city = trueis_off_peak = truehas_attraction = false#you may modify the lines of code above, but don't move them! #when you submit your code, we'll change these lines to#assign different values to the variables.#imagine for a moment that you're a college student who wants#to travel during spring break. you have a destination in#mind. what determines whether you can go there? ##first, how would you pay for the trip? if you can afford it#(can_afford), then all you need is for your parents to agree#to let you go. your parents will agree to let you go if the#destination is safe (destination_is_safe).##if you can't afford it, then you need your parents to pay for#the trip. your parents will pay for the trip if the destination#is safe (destination_is_safe) and if either there is educational#value (educational_value) or there are relatives nearby for#you to visit (relatives_nearby).##second, are you sure you're able to go to this location? if#it's international (is_international), then you'll need a#passport (have_passport) and you can't be afraid to fly#(afraid_to_fly). if it's not international (is_international),#then you either must have a car (have_a_car) or you can't be#afraid to fly (afraid_to_fly).##third, do you actually want to go to this location? if it's a#beach location (is_a_beach), then you want the weather to be#warm (is_warm). if it's instead a skiing location (has_skiing),#you don't want it to be warm (is_warm). if it's a tourist city#(is_a_city), then you either want it to be an off-peak travel#time (is_off_peak) or you want there to be an attraction in#town that week (has_attraction).##if it's both a beach and a city, then you'd decide to go if it#meets the condition for the beach (it's warm) or for a city#(is an off-peak time or has an attraction). if it's both a#skiing location and a city, then you'd decide to go if it meets#either type of location's conditions as well.##your only goal here is to print true or false: true if the#destination represented by the variables is an acceptable#travel location, false if it is not.##hint: don't try to do this all in one line. break it into#smaller parts.#add your code here! note: this is python

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:00, Riddledjam44623
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, lashaunahard
Each time you save a document, you will need to type in the file type in which it should be saved you can select the save button to save it with the same file name if it has been previously saved you will need to select the location to save the file you will need to use the save as dialog box
Answers: 1
image
Computers and Technology, 24.06.2019 11:30, AnwarWeirdLol8811
Why is body language an important factor in a business meeting
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, alexisbeasley2
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
You know the right answer?
Can_afford = truedestination_is_safe = trueeducational_value = truerelatives_nearby = trueis_interna...

Questions in other subjects:

Konu
Computers and Technology, 11.11.2019 22:31
Konu
Mathematics, 11.11.2019 22:31
Konu
Health, 11.11.2019 22:31