Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help with answers soon as possible Hannah worked 45 worked hours last week. This value is being stored in the variable NumHours. She makes

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
please help with answers soon as possible
Hannah worked 45 worked hours last week. This value is being stored in the variable NumHours. She makes $10.00 an hour. This value is being stored in the variable Rate. What is Hannah's weekly pay, given that it was determined using the algorithm listed below? (Note: when translated to a language, this algorithm will run.) If (Rate >=10) or (NumHours 1000 then bonus = 0.1 sales end if if sales > 750 then bonus - 0.075 . sales end if if sales > 500 then bonus - 0.05 sales end if if sales > 250 then bonus = 0.025 * sales else bonus end if 0 82.50 27.50 110 55 The algorithm listed below is incomplete. Choose the line necessary to place the asterisks (") with the proper condition so that the algorithm will calculate a square root of a number entered by the user. (Note: when translated to a language, this algorithm will run.) Write "Enter a number: Write "The square root of that number will be displayed." Input My Number ***** Write "The square root of " + My Number Write "is: + Sqrt (MyNumber) Else Write "Illegal operation! End If If MyNumber =0 1 pts Question 4 Question 4 In an If-Then-Else selection structure, at least one line of code will always be skipped. True False Question 5 In Python when using an IF structure, to denote the end of the IF statement, you w Question 5 1 In Python when using an IF structure, to denote the end of the IF statement, you would enter: nothing endifo Question 6 1 pts The following algorithms Question 6 1 pts The following algorithms are supposed to calculate a bonus for salespersons who generate between $1,500 and $2,000 in sales. You are testing this algorithm and decide to use $1,700 for total sales.. Which statement listed below will print out "Congratulations on a great month!"? (Note: when translated to a language, this algorithm will run. If TotalSales >=1500 And 1500 And TotalSales 1500 Or TotalSales -2000 Then print "Congratulations on a great month." End If Question 7 Which of the following is not a type of selection structure? single-alternative multiple-alternative Case or switch dual-alternative All of these are types of selection structures. Question 8 1.5 pt: What kind of arcoric hreindistand with the code witte halwe What kind of error is being displayed with the code written below: La Python 3.4.1: TestScoresBad py - C/Users/jenawaye/Desktop/TestScoresBad.py File Edit Format Ron Options Windows Help This program will ask the user for a test score and then print tout the letter grade #declare variables teatacore - float() lettergrade - str() testscore float (input ("Enter a test score: ")) s testscore >= 90: lettergrade - if testscore > 80: lettergrade - if testscore - 70: lettergrade - "CM af testscore >- 60: lettergrade - "D" print("The letter grade ist ", lettergrade) En 23 Coto run-time logical syntax none of these are correct. Question 9 1.5 pts What is the result of the following Boolean expression, given that x = 5, y = 3, and z= 8? not (x x) and y >> pittaa total logical run-time None of these are correct. syntax Question 13 1.5 pts What error is being demonstrated by the code listed below: x de Fomu to Options Window up Gelare varishlas breakfast - Toato Ronah - Float() dinner - touto total - Lost th x Ed Shell OW python 3.6.4 3.6. &ideos, De 19 2017, 06:54:40) Dec v. 1904 bit WE Type "weight"redita" or " for more information Back To Calori breakfast - watter the stories that In - floatingut enter the calories Ath")) dinner - Floatingut the valori da") bine total stories total - ratast lonch dinner it to Total calorie con today . total syntax run-time None of these are correct. logical Question 14 1 pts What should you NOT do when you are trying to debug your.code? Get help from a tutor All of these are correct. None of these are correct. Take a break. Come to office hours Get help from a classmate Keep typing in more code. At some point you will get your code to work. Instructions Read the problem description below. Create the Decomposition for this problem. Additionally supply a listing of inputs and outputs. Finally provide a description of the decision structure you would use to solve the problem. This description needs to include the conditions you would use to solve the problem. Remember this is NOT to be solved using Python. Submissions showing Python code will receive a 0. Finally make sure you clearly mark your answer as Decomposition, Inputs & Outputs and Decision Structure. Problem You are being asked to help create a program that will determine the cost of a gym membership. A standard membership is $100. This price does not include any extras. Extras include: use of tennis courts ($25), rock climbing ($100) or a personal trainer ($50). The program needs to ask the user for their name and which extra they would like to purchase. The program needs to print out the user's name, the cost of the extra if they choose one and the total cost of their membership Grading Decomposition == 2 points Inputs/Outputs -- 2 point Decision structure logic == 2 points Edit View Insert Format Tools Table 12pt Paragraph B IV AeTv 20 pts Open IDLE or VS Code and write program to solve the problem listed below. Create a program that will calculate the correct number of packages for hot dogs. The program will need to ask the user how many people are coming to the party and will print out the number of packages for hot dogs they will need to buy From past experience you know that most party guests will consume between 1 to 2 hot dogs each. Therefore, in order to make sure you have enough, multiply the number of guests by 1.5 to determine the total number of hot dogs. To determine the number of packages, realize that hot dogs come in packages of 10. Since we are estimating the number of hot dogs consumed at the party to be about 1.5 dogs per person, if the number of hot dogs left over is greater than 5, add another package of dogs. Otherwise don't add an extra package. For instance, if there are 30 people coming to the party that equates to 45 hot dogs. That would mean we would need to to purchase 5 packages of dogs. (HINT: When solving this don't forget about the modulus operator.) Make sure your input statements and output statements have prompts so that they can identify to the user what the inputs and outputs are doing. Additionally include at the top of your code the Decomposition for this problem. Your grade will be based on the following rubric: Pts. Exemplary Pts. Competent Pts. Developing Pts. Did not complete Completed the Decomposition and Decomposition inputs and Missing a Did Not Complete identification of

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions