Write a programs that will take 3 lists: Name Wage Hours Juan 7.50 35 Rae 11.00 41 Ivanna 18.25 26 Lilly 9.25 35 Robert 11.10 45 and use this logic: An employee gets overtime when they have worked more than 40 hours Overtime pay is calculated using this formula: Gross Pay = (35*Wage) + ((Hours-35)*Wage*1.5) Regular pay is calculated using this formula: Gross Pay = (Hours*Wage) Create both a "for" loop and a "while" loop to process these lists. Print each employee, their wages, Hours and gross pay. Provide flowcharts.
Q: Write a Python program that will take 1 lists and 2 dictionaries: Name Wage Hours Juan 7.50 35 Rae…
A: Objective : we need to write a program that takes 1 list and 2 dictionaries. Using those lists and…
Q: Write a program in c ++ that inputs four numbers separated by spaces. The program should count how…
A:
Q: Write a program that reads form the keyboard student test scores in the range 0 – 100, and store…
A: I give the code in python and use all three functions as per your requirement and provide the output…
Q: Write a program that first gets a list of integers from input. That list is followed by two more…
A: Program code: # Get the first line of input s = input() #array of integers lst = [] #array to the…
Q: Oh notation, in terms of the variable N. In other words, write the code's growth rate as N grows.…
A: Oh notation in terms of the variables.for the code:-A ArrayList<Integer> list = new…
Q: Write a program that reads a number and finds it is a prime or not. 0. A prime number is a number…
A: Below is the required program in C++ language. Program Approach: Include header files and use…
Q: If you add up all the digits in 468, you get 4 + 6 + 8 = 18. The square and cube of 468 are 219024…
A: As the language is not mentioned, So here is the python program for the same.
Q: PYTHON The data is given as a list of integer with comma separated in the order , (i.e. […
A: Algorithm: Start define a method which takes a list as parameter Inside the method, initialize flag…
Q: End of semester grades are quickly approaching and some nice guy hacker wants to write a function…
A: Solution: Given, End of semester grades are quickly approaching and some nice guy hacker wants to…
Q: You have to modify the given Java function. You will be given a list of numbers, where numbers will…
A: The question asks to find such an element which occurs exactly 5 times using java.
Q: Arun is a sequence of adjacent repeated values. Write a program that generates a sequence of 20…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: Write a python program to compute some statitistics for a class of students’ scores on an…
A: Required Python provided Below :
Q: Write a program in C++ that asks the user to input 2 lists of numbers, 5 numbers per list. Your…
A: Introduction of Program: The C++ program takes 5 elements in the first list and 5 elements in the…
Q: Write a Python program that takes 7 inputs and appends them to a list (aGrades). Randomize the…
A: In the solution of problem, first we read grades and add into aGrades list using append() function.…
Q: Given positive integers n and r, list all the r-permutations, with repetition allowed, of the set…
A: Since no programming language is mentioned, I am using python. Algorithm: Start import itertools…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: Algorithms: Create a function normalize(dataset) Find the largest value Iterate through the loop…
Q: Write a function gravity that evaluates y(t) = v0t - (1/2) gt2 at n uniformly spaced times between…
A: A function is a code which possibly runs when it is called. You can pass information, known as…
Q: write a python prgram (oop) Implement the design of the Groceries and Buyer classes so that the…
A: Everything is mentioned in the comments and screenshots are also provided…
Q: Write a program that reads a list of grades (separated by comma) for a class (one line per student)…
A: Step 1 : Start Step 2 : Open the InputGrade.txt file in read mode Step 3 : Open the OutputGrade.txt…
Q: Write a funclion sum of squares(xs) that computes the sum of the squares of the numbers in the list…
A: We have given a list of numbers, of which we have to find the sum of squares. For example- case 1:…
Q: We need to store information about each student in a class of N students. For example,name,…
A: Program: #include <iostream>using namespace std; //defintion of class Studentclass Student{…
Q: Write a programs that will take 3 lists: Name Wage Hours Juan 7.50 35 Rae 11.00 41 Ivanna 18.25 26…
A: PROGRAM: #defining 3 lists name=["Juan","Rae","Ivanna","Lilly","Robert"]…
Q: Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice…
A: I give the code in python(because you have not mentioned any particular language) and also provide…
Q: Using C++, A contact list is a place where you can store a specific contact with other associated…
A: Below is the required C++ program: - Approach: - Import the essential headers and use the…
Q: Write a program that takes sequence of comma separated numbers an input from the user. The program…
A: Code: #reading list of numbers with comma separatorL = [int(x) for x in input("Enter numbers with…
Q: Create a program that reads a input question (full question) from the user and then matches it with…
A: It is defined as a powerful general-purpose programming language. It is used in web development,…
Q: program is to be written in c Write a program that first gets a list of integers from input. The…
A: #include <stdio.h>#include <stdlib.h> //function declarationvoid…
Q: In Java, consider the following declaration. double[] list = new double[75]; Which of the…
A: Here we have an array whose size is initialized to 75. This array will store 75 elements in the…
Q: Write a Python program that reads from an input from user n student test scores in the range 0- 100…
A: Given:
Q: Write a program that reads form the keyboard student test scores in the range 0 - 100, and store…
A: As the language is not specified answer written in python
Q: Write a program that first gets a list of integers from input. The input begins with an integer…
A: Approach We will use for loop to iterate over each list element and if statement to check whether…
Q: Add a print statement in the program below that prints all of the entries in the list at the end.
A: height and name are initially lists and they are updated as return values and this makes previous…
Q: Write a C program that reads integers, finds the sum and the average of them. Assume that the input…
A: #include<stdio.h> float computeAverage(float sum,int counter){ return sum/counter;} int…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: Given: When analyzing data sets, such as data for human heights or for human weights, a common step…
Q: Write a Python program that takes 7 inputs and appends them to a list (aGrades). Randomize the…
A: Note: The below python program takes "7" random scores and appends them to a list. Program: import…
Q: Write a Python program that takes 7 random scores as inputs and appends them to a list (aGrades).…
A: Given: Calculate the number of exams as the length of the list minus one; assign examCount to…
Q: Write in JAVA When analyzing data sets, such as data for human heights or for human weights, a…
A: History of Java Ames Gosling create Java at Sun Microsystems in the outset. It became a fundamental…
Q: Write a program that reads HAND_SIZE cards from the user, then analyzes the cards and prints out the…
A: Given: Write a program that reads HAND_SIZE cards from the user, then analyzes the cards and…
Q: In Python, Write a program that gets a list of integers from input, and outputs non-negative…
A: Program description : The python program prompts users to enter a list of integer values mix of both…
Q: Write a program that lists all Fibonacci numbers that are less than or equal to the number k (k≥2)…
A: Write a C program that lists all Fibonacci numbers that are less than or equal to the number k (k≥2)…
Q: In Java: When analyzing data sets, such as data for human heights or for human weights, a common…
A: Complete answer is given below .
Q: Write a program that reads a set of integers from user and then prints the sum of even and odd…
A: Use an infinite loop to accept inputs and whenever 0 or any negative value is entered exit from loop…
Q: Exercise 3: Write a program that reads from an input screen n student test scores in the range 0-…
A: code :- # variables to store the number and marks of the students total = 0marks = []marks_range =…
Q: Write a python program called p3.py. Your program should have the following functionality: Randomly…
A: 1) Below is program to randomly select a word from list, prompt user to guess a letter and…
Q: For this program, adjust the values by subtracting the smallest value from all the values. The input…
A: EXPLANATION - Create a program . Declare a variable num and take number of elements to be entered…
Q: Write a program that asks the user to input 2 lists of numbers, 5 numbers per list. Your program…
A: Given: Write a program that asks the user to input 2 lists of numbers, 5 numbers per list. Your…
Q: Consider the following code, write a for enhanced loop to input the hours worked for each day…
A: Import the java utility package In Demo class enum is declared with the Days values Create a Object…
Q: Write a Python program that reads from an input from user n student test scores in the range 0- 100…
A: GIVEN:
Q: Exercise 3: Write a program that reads from an input screen n student test scores in the range 0 –…
A: Answer Python code for above problem array=[]ranges=[0,0,0,0]while True: value=input("Enter a…
Q: Write a Python program that prompts the user to enter a list of words and stores in a list only…
A: Program: result = [] while True: word = input("Enter a word(enter to exit): ") if word ==…
Write a
Name | Wage | Hours |
Juan | 7.50 | 35 |
Rae | 11.00 | 41 |
Ivanna | 18.25 | 26 |
Lilly | 9.25 | 35 |
Robert | 11.10 | 45 |
and use this logic:
An employee gets overtime when they have worked more than 40 hours
Overtime pay is calculated using this formula:
Gross Pay = (35*Wage) + ((Hours-35)*Wage*1.5)
Regular pay is calculated using this formula:
Gross Pay = (Hours*Wage)
Create both a "for" loop and a "while" loop to process these lists.
Print each employee, their wages, Hours and gross pay.
Provide flowcharts.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers in the list. The first integer is not in the list. Your program must define and call the following two functions. is_list_even() returns true if all integers in the list are even and false otherwise. is_list_odd() returns true if all integers in the list are odd and false otherwise.def is_list_even(my_list)def is_list_odd(my_list) My program is failing on is_list_even([10,12,14]) and is_list_odd([9,11,13]) Code so far: def is_list_even(my_list): for i in range(len(my_list)): if my_list[i] % 2 != 0: return False return True def is_list_odd(my_list): for i in range(len(my_list)): if my_list[i] % 2 == 0: return False return True if __name__ == '__main__': my_list = [] n = float(input()) for i in range(n):…Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers in the list. The first integer is not in the list. Your program must define and call the following two functions. is_list_even() returns true if all integers in the list are even and false otherwise. is_list_odd() returns true if all integers in the list are odd and false otherwise.def is_list_even(my_list)def is_list_odd(my_list) Must pass the following attached screen shot testWrite a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow. Your program must define and call the following two functions. is_list_even() returns true if all integers in the list are even and false otherwise. is_list_odd() returns true if all integers in the list are odd and false otherwise.def is_list_even(my_list)def is_list_odd(my_list)
- A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Ex: If the input is: 3 Joe 123-5432 Linda 983-4123 Frank 867-5309 Frank the output is: 867-5309 Your program must define and call the following function. The return value of GetPhoneNumber is the phone number associated with the specific contact name.string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName) #include <iostream>#include <vector>using namespace std; string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName) {} int main()…5.24 In Python: Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow. Ex: If the input is: 5 2 4 6 8 10 the output is: all even Ex: If the input is: 5 1 3 5 7 9 the output is: all odd Ex: If the input is: 5 1 2 3 4 5 the output is: not even or odd Your program must define and call the following two functions. is_list_even() returns true if all integers in the list are even and false otherwise. is_list_odd() returns true if all integers in the list are odd and false otherwise.def is_list_even(my_list)def is_list_odd(my_list)Write a program that takes sequence of comma separated numbers an input from the user. The program prints odd numbers in a list and cube of those numbers in another list. The program output must follow the output format as in the example given below. Example: Enter numbers with comma separation: 32,3,23,4,3,4,1,5 Then the output of your program must be: List of odd numbers: [3, 23, 3, 1, 5] The cube list of odd numbers: [27, 12167, 27, 1, 125] using Python
- In Python, Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced. Ex: If the input is: automobile car manufacturer maker children kids The automobile manufacturer recommends car seats for children if the automobile doesn't already have one. the output is: The car maker recommends car seats for kids if the car doesn't already have one. You can assume the original words are unique. The code that I recieved was as follows and it works perfectly, except I get the answer wrong due to white space at the end of the punctuation of the output. Is there any way to fix that in this code here? A required program is as follows, #Define main() function def main(): #Read data from the user replace_pairs = input() #Split replacement pairs into list replace_pairs = replace_pairs.split() #Create two lists for original and replacement…Write a program in python that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow. Your program must define and call the following two functions. is_list_even() returns true if all integers in the list are even and false otherwise. is_list_odd() returns true if all integers in the list are odd and false otherwise.def is_list_even(my_list)def is_list_odd(my_list)In Python I keep getting a whitespace error Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced. Ex: If the input is: automobile car manufacturer maker children kids The automobile manufacturer recommends car seats for children if the automobile doesn't already have one. the output is: The car maker recommends car seats for kids if the car doesn't already have one. You can assume the original words are unique. My Code: #Define main() function def main(): #Read data from the user replace_pairs = input() #Split replacement pairs into list replace_pairs = replace_pairs.split() #Create two lists for original and replacement words originalWord = [] replacementWord = [] #Iterate through replacement pairs for i in range(len(replace_pairs)): #If it is even place if i % 2 == 0: #Append current item to original…
- Write a function findMaxTuple() that gets a list of tuples as parameter, finds and returns the tuple with maximum sum inside the list. Write Python statements that create a sample list that has tuples inside (you can use the list of tupples in the sample run below), then use findMaxTuple() function to get the tuple with maximum sum and print it. Part-4:Sample tuples= [(3, 4, 360, 6), (1, 2), (12,), (132, 244, 64), (72, 71, 70)]Maximum tuple is (132, 244, 64)Write a python program that has the following functionality:• Using a loop it creates a two-dimensional list with 3 elements, such that theseelements are empty lists. (i.e., [ [ ], [ ], [ ] ] ).• Using a nested loop your program should store three (3) random integers between 1and 25 (inclusive) in each of these empty lists. A sample list after this step shouldlook like this; [ [4, 17, 25], [7, 7, 16], [21, 17, 5] ]• Using another nested loop your program should multiply each integer stored in thatlist and print the result. For the sample list given above the result is 2379048000.Write a Python program that takes 7 random scores as inputs and appends them to a list (aGrades). Randomize the scores between 59 and 100). The final exam will be the last item in the list. Calculate the number of exams as the length of the list minus one; assign examCount to len(aGrades)-1. Here we will introduce the function sum() to the class. The Total Points will be equal to the sum of the list minus the final exam. Assign Total Points to sum(aGrades)- aGrades[lastitemIndex]. Compute the Test Average to be equal to the Total Points divided by the length of the list minus one. Assign Test Average to Total Points / examCount The final average will be equal to 60% of the test average plus 40% of the Final Exam. Assign Final Average to Test Average *.6 + Final Exam * .4 Display the grades list, test average and the final average on separate lines. Upload the code, with comments explaining each line of code and their variables. .