Assuming quantity has already been declared as Integer and discount has been declared as Real, write the pseudocode program segment that uses range checking to set the discount based on the following table: quantity discount 0 – 4 0.00 5 – 9 0.05 10 – 14 0.07 15 or more 0.09 You may use either high-end or low-end values for range checking. You do not need to indicate which method you are using. Hint: Indentation is important. “Tab” key is not available when use Canvas Editor. Press the space bar five times instead.
When possible, you should avoid using constants in a program…
When possible, you should avoid using constants in a program.
Write out the exact screen output for each program segment….
Write out the exact screen output for each program segment. If provided with multiple spaces, each space stands for a line and in sequence. The second space stands for the 2nd line on the output screen. Fill in the output in the spaces accordingly. If there is no output on that line, you must type in “No output” in the spaces provided. Leaving the space blank will be considered as “The student did not answer this question.” will result in a 0 to that question. If the segment does not generate any output, type in “No output” in all the spaces provided.
routes.py @application.route(‘/plotly_example’, methods=(‘GE…
routes.py @application.route(‘/plotly_example’, methods=(‘GET’, ‘POST’))@login_requireddef plotly_example(): locations = classes.Location.query.all() output = plotly_map(locations) return render_template(‘plotly_map.html’, source=output) def plotly_map(locations): data = , lon=, text=, mode=’markers’, )] layout = Layout( autosize=True, hovermode=’closest’, mapbox=dict( accesstoken=mapbox_access_token, bearing=0, center=dict( lat=mean(), lon=mean() ), pitch=100, zoom=10 ), ) fig = dict(data=data, layout=layout) output = plotly.offline.plot(fig, include_plotlyjs=False, output_type=’div’) return(output) plotly_map.html {% block content %} {{ source|(1) }} {% endblock %} Which filter should be used for (1) to render the json output on plotly_map.html?
Use the previous two problems and Venn Diagram you created,…
Use the previous two problems and Venn Diagram you created, find how many people plan to visit exactly two places.
Assuming age is an Integer, change the expression NOT (ag…
Assuming age is an Integer, change the expression NOT (age < 5)to an equivalent positive logic expression.
Note: This an extra-points question. Given the following pro…
Note: This an extra-points question. Given the following program: Specify exactly what is output in the blanks below, one line in each blank. If nothing will appear on a line, type No ouput in that blank. (Note: This question is worth 5 extra credit points.)
The control structure in which one step follows another, spe…
The control structure in which one step follows another, specifying the order in which the computer will execute the steps, is called the control structure. The control structure that allows for branching (choosing between multiple alternative paths) is called the control structure. The control structure that allows for a section of code to run multiple times is called the control structure.
Given the following program segment: Specify exactly what i…
Given the following program segment: Specify exactly what is output in the blanks below, one line in each blank. If nothing will appear on a line, type No output in that blank.
‘A’ and ‘B’ each stand for a boolean expression or value. ‘1…
‘A’ and ‘B’ each stand for a boolean expression or value. ‘1’ stands for true; ‘0’ stands for false. Fill in the missing values of the AND truth table below, use either ‘1’ or ‘0’: A B AND 0 0 0 1 1 0 1 1 Fill in the missing values of the OR truth table below, use either ‘1’ or ‘0’: A B OR 0 0 0 1 1 0 1 1