Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer 7 questions using python, all information is given Decision Structure Practice | ** Download the file, fill in the answers, and submit in the

image text in transcribedimage text in transcribed

Answer 7 questions using python, all information is given

Decision Structure Practice | ** Download the file, fill in the answers, and submit in the assignments link. To download Click on File, Download as, Microsoft Word > Click Save 1. Write the code that displays as output "It is a Porsche" when the variable named car contains the string "Boxsters" (entered using any case). 2. Write the code that displays as output "Sufficient Quantity" when the contents of the Instock variable is >=10 otherwise display "Time to Reorder" 3. Write the code that assigns the number 500 to the bonus variable when the sales variable's value is greater than or equal to 5000; otherwise, assign the number 100. 4. Write a nested control structure that displays the following based on the values in the variables member and age. Criteria Member and 18 or older Display "You are old enough Member and under 18 Display "You need an adult" Not a member Display "You need a membership" 5. Based on the table below write the code that assigns the appropriate value to the shipping variable when the state variable contains the string "Hawaii", "Washington", or "Oregon" (entered using any case); otherwise, assign the number 55 to the shipping variable. State Shipping Hawaii 100 Oregon 75 Washington 70 6. Write the code that assigns the number 15 to the discount variable when the state variable contains the string "WA" (entered using any case) and the sales variable contains a number that is less than 2000; otherwise, assign the number.25. 7. Using the information in the table write the code to calculate total owed. Store total owed in a variable named total: Value in Units variable Multiply by value >=100 25 Between 50 and 99 (inclusive) 30 Less than 50 35 Less than or equal to 0 Display as output "Entry error

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions