Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, Gaby702
Which is produced by the endocrine system to control how cells and organs function
Answers: 2
image
Computers and Technology, 22.06.2019 06:30, westjayson69
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, addisonrausch
What season was better from fortnite?
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, jokerr6323
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e. g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
Do you know the correct answer?
Can_afford = truedestination_is_safe = trueeducational_value = truerelatives_nearby = trueis_interna...

Questions in other subjects:

Konu
Biology, 22.06.2019 03:30
Konu
Mathematics, 22.06.2019 03:30
Konu
Chemistry, 22.06.2019 03:30