Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please for # 2 & 3 the profram is python 1) Complete the following program that does salary calculations for employees. The code below contains

image text in transcribed
Please for # 2 & 3
the profram is python
1) Complete the following program that does salary calculations for employees. The code below contains the basic logic. a) You will need to add a loop to continue calculations until the user types in "done (sentinel). b) You will add code to perform the following input validations-check to ensure the number of hours worked is more than o but less than 80. In [ ]: # complete code using instructions above basehr 40 basepay-10 hours int (input( 'Enter Hours Worked)) if hours basehr: ot hr-hours-basehr pay (basehr basepay)+(ot hr basepay 1.5) else: print('Your pay is s, pay, sep put something here already pay (hours basepay) 2) Ask the user to type in an integer greater than 50 and assign it to a variable called x. Write a program to calculate the sum of squares of positive integers. The loop should stop when the sum is greater than x. At the end of the loop print how many numbers were used to calculate the sum. For example, if x is 100, sum will be 91, and six numbers (1 to 6) were used to calculate sum. In I 1: 3) Ask the user to type in a positive integer and assign it to a variable called x (this represents how many numbers the user plan to enter). The user will then input x positive integers. Write a program to find the largest odd number entered by the user In [11j n5 largest-1 tor i in range (n)

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

Students also viewed these Databases questions