Draw a flow chart for the following problem: a. Ali sells bunches of flowers at the local shopping centre at amount of (registration number*0.5 e.g if reg# is 100 then 100*0.5). One day Ali's boss, Hassan, tells Ali that at any time during the day he (Hassan) will need to know: how bunches of flowers have been sold many what was the value of the most expensive bunch sold what was the value of the least expensive bunch sold what is the average value of bunches sold
Q: in c++ In this exercise, we will read in a data file of employees (file is furnished to you,…
A: Read data from employee.dat file.The employee.dat file contains SSN number of the employee, last…
Q: 2. Write a program that returns the minimum of a single-variable function g(x) in a giver region [a,…
A: It is defined as an interpreted, object-oriented, high-level programming language with dynamic…
Q: python Given a number of small rice bags (1 kilo each), a number of large rice bags (5 kilos…
A: Below is the code in python and sample output:
Q: Interesting, intersecting def squares_intersect(s1, s2): A square on the two-dimensional plane can…
A: Actually, given information: A square on the two-dimensional plane can be defined as a tuple (x, y,…
Q: Problem 5 Simplify the following Boolean Expression to a minimum number of literals. (a'b' + c)(a +…
A: Simplified the given boolean expression
Q: Let f(x)=ax+b and g(x)=cx+d, where a, b, c, and d are constants. Determine necessary and sufficient…
A: Given: Let f(x)=ax+b and g(x)=cx+d, where a, b, c, and d are constants. Determine necessary and…
Q: person is trading his money in the stock exchange market. Assume that the daily price of a specific…
A: Solution:
Q: Exercise 4.31 shows how to test whether a point is on the left side of a directed line, on the…
A: Using Java language for this program.
Q: Problem 1: Let P(x, y) denote the statement “Student x has taken class y”, where the domain for x…
A: Let P(x, y) denote the statement “Student x has taken class y”, where the domain for x consists of…
Q: Suppose we have g(n) = 2n and h(n) =n3 Below are a number of statements regarding how the functions…
A: The answer is A,D Is true.
Q: Write an assignment statement that might be used to implement the equation below: (use the pow(a,b)…
A: y = 4x⁴+ 2x² + 1 Here we need to function like pow(a, b) which means ab
Q: 2. Write a program that returns the minimum of a single-variable function g(x) in a given region [a,…
A: Step 1 INTRODUCTION: Python is a strong general-purpose and high-level programming language. It is…
Q: Identify each declared variable along with its scope in each of the following example expressions.…
A: Answer: variables: a. x b. x, y c. ls
Q: 2. A certain company gives commission to each of their salesmen based from the type of appliance…
A: 2. A certain company gives commission to each of their salesmen based from the type of appliance…
Q: Simplify the following Boolean functions using three-variable maps. PLEASE EXPLAIN IN WRITING THE…
A: Part(1) Given that the number of variables that are present for processing is 3 which are x, y, and…
Q: Given that A and B are real variables with values 1.5, and 2.5 respectively, and C is integer…
A: The given expression is following: NOT(A<0) AND (B/C<=0) The answer is FALSE or 0.
Q: Problem 2 We have n stairs and you can stand in stair 1 or 2 at first. Each stair costs some money…
A: Dynamic programming is the technique in computer programming which helps to efficiently solve the…
Q: Question 17 Simplify the following Boolean expression. F(W, X. Y. Z) = !WX!Y!Z + WXIYIZ + !WXYIZ +…
A: Here in this question we have given a boolean expression and we have asked to simplify this…
Q: use c++ to answer the folloing question in an ancient land, the beautiful princess Eve had many…
A: Given data is shown below: use c++ to answer the following question in an ancient land, the…
Q: The electricity accounts of residents in a very small town are calculated as follows: a) If 500…
A: ip = [200, 500, 700, 1000, 1500]; for i=1:5 un = ip(i); ct = 0; if un <= 500 ct = un * 0.02;…
Q: Interesting, intersecting def squares_intersect(s1, s2): A square on the two-dimensional plane can…
A: The given information: def squares_intersect(s1, s2): A square on the two-dimensional plane can be…
Q: Vandelay Industries has 275 sales reps in order to sell its latex products, each to be assigned to…
A: '''Declre number of reps'''n=275;''' According to the given statements we can conclude eqution…
Q: Consider the following programming problem: In 1627, Manhattan Island was sold to Dutch settlers for…
A: Calculating compound interest: Using the following formula (where interest is compounded annually),…
Q: (c) If x and y are integers such that x > 1, and x divides y, then xł(y+1).
A: - The question is to prove that if x and y are integers and X is greater than 1 and X divides Y…
Q: This is a predicate logic question Let P(x) mean "x is a program"; F(x) mean "x is a function";…
A: Predicate logic: It is an expression of one or more variables which is determined on the specific…
Q: You are presented with a set of requirements under which an insurance policy can be issued. The…
A: Question :-
Q: Write a C++ program, with functions, to evaluate Esaul Guzman’s customers and their respective…
A: Code to copy: #include <iostream> using namespace std; double offenceTypeCharge() { int…
Q: Consider the PreviousDate() function. This function takes three parameters month, date, and year as…
A: Given: Consider the PreviousDate() function. This function takes three parameters month, date, and…
Q: Make a program in C++ that helps a company to increase the wages of workers as follows: 1. Type of…
A: Here I have taken input from the user and then stored the value entered by the user into a variable.…
Q: Draw a flow chart for the following problem. i : Compute net salary for a tax rate of 30% ii :…
A: To draw the flowchart of the given problem: The program is to: Input Gross Salary Compute Total Tax…
Q: 1. (5.8 in 8e) Show the value of x after each of the following statements is performed: a) x…
A: Since there are multiple questions and you have not specified which question is to be answered, we…
Q: Ram, Mohan and Sohan took loan of Rs. x, y and z on rate of interest r%, p%, q% for time t1, t2 and…
A: #include <stdio.h> int main(){ float x, y, z, p, q, r, t1, t2,t3; printf("Enter the…
Q: Consider the quadratic equation: . Given a, b and c as input, determine whether the roots of this…
A: NOTE - I have used the Python programming language. Here I have taken input from the user and then…
Q: It can be said that statement P is a necessary condition for statement Q if Q ⇒ P is true. In other…
A: Introduction: A prime number is a natural number greater than 1 that is not a product of two smaller…
Q: e club on a day. b)Computer club wants to use on Monday or Thursday. c)Drama club wants on…
A: Q. Suppose you are trying to make a schedule for use of the auditorium for different clubs in a…
Q: PROGRAM EXAMPLE VAR y, n FUNCTION POWER (IN n) BEGIN IF n == 0 THEN return 1 ELSE return y *…
A:
Q: I am working as a cashier at the local convenience store. A customer’s bill is $1.09, and he gives…
A: Given: I am working as a cashier at the local convenience store. A customer’s bill is $1.09, and he…
Q: (b) Your code should check that the interest rate is a number between 0 and 1 and that the principal…
A: As per the bartleby policy we can not answer both questions at single attempt. Kindly repost your…
Q: Using pseudo code (java), provide an algorithm for the use cases below; Apply for a loan
A: Requirements for loan (I) user account . (II) check balance criteria like yearly 1 lakh minimum.…
Q: Write a C++ program to estimate the student's grade of 7 Courses, by following the conditions below:…
A: Actually, program is a executable software that runs on a computer.
Q: store has issued two different coupons
A: Function notation for the first coupon that gives customers $25 off their purchase price: Let x…
Q: You shouldn't date someone whose age is less than half your own age plus 7. Write a boolean-valued…
A: The above question is solved in step 2 :-
Q: An arcade machine accepts $0.50 and $0.75 tokens. Once the machine accepts at least $1.00, it stops…
A: DFA refers to deterministic finite automata. DFA machine reads an input string one symbol at a time.
Q: An amortization calculator is used to determine the periodic payment amount due on a loan (typically…
A: A = P(i + i/((1+i)^n-1)) where, A = periodic payment amount. P = amount of principle. i = periodic…
Q: Consider a problem: some workers need to take tables across a road. The road only allóws two people…
A: According to our guidelines we solve first one:…
Q: Study the definition of function "Secret" and answer the question below. double Secret (double x,…
A: Please find the answer below :
Q: Negotiating a consumer loan is not always straightforward. One form of loan is the discount…
A: Algorithm: Start READ loanAmount READ interestRate READ loanDuration Compute: year =…
Q: In the following, f(x), g(x) and h(x) are all positive value real functions. (Note: Answer true if…
A: As per our guidelines, only 3 sub parts will be answered. So, please repost the remaining questions…
Q: Four chairs are arranged in a circle as shown here... They are designated A, B, C, D. Each chair may…
A: Since A, B, C, D are four variables, so the truth table contain 24 = 16 rows. (a) Given F(D, C, B,…
Q: Simplify the following Boolean functions using four-variable maps. PLEASE EXPLAIN IN WRITING THE…
A: Part(1) Given that there are four variables named as A, B, C, and D. Now, the minterms that are…
Step by step
Solved in 2 steps with 1 images
- Q1.What is the smallest 32-bit floating point number f such that 128 + f > 128 ? What is the smallest 32-bit floating point number g such that 1 + g > 1 ? What is the relationship between f and g? Where f and g are differentiable functions. We have found that the given functions have the same derivative. In general, if two differentiable functions differs by a constant at x, its derivatives slopes at this point are the same. Write a short C++ or Python program to support your answer (for example, show that you checked whether there is no smaller number than your f by trying 128+f/2 == 128. Q2. Explain what changes are needed to change the 4x3 memory presented on Slide 62 of Chapter 3 to a 16x6 memory.Transcribed Image Text About initial programming in python: Consider the series: 8. 1)" 1 = 1- 3 1 1 1 2n | 1 n=0 whose sum converges ton/4 That is: П lim s, = a) Write a function that, given n, calculates the sum of the series up to term n. b) Write a function that calculates the sum of the series with an error of less than O.01, that is, calculate the sum of the series series such that |Sn-N/4| < O. 01. Your function must also return the number of terms necessary to reach this error, that is, your function will return a tuple with the two calculated values. Important: It is mandatory to use the function defined in the previous item. Hint: math.fabs(number) returns the absolute value (module) of a number.The function f takes number of weeks since a factory was opened and gives number of operational factory lines, g takes number of weeks since a factory was opened and gives total number of items the factory needs to produce. Combine these so that C takes number of weeks since a factory was opened and gives how many items per line must be produced.
- please do the following in c++ A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted S1, opens every locker. Then the second student, S2, begins with the second locker, denoted L2, and closes every other locker. Student S3 begins with the third locker and changes every third locker (closes it if it was open, and opens it if it was closed). Student S4 begins with locker L4 and changes every fourth locker. Student S5 starts with L5 and changes every fifth locker, and so on, until student S100 changes L100.After all the students have passed through the building and changed the lockers, which lockers are open? Write a program to find your answer and display all open locker numbers separated by exactly one space.(Hint: Use an array of 100 bool elements, each of which indicates whether a locker is open (true) or closed (false). Initially, all lockers are closed.)Q. Taylor Series expansion of sine for x is computed as follows: sin x=x - x^3/3! + x^5/5! - x^7/7!+... Let the value of x be 30, hence radian value for 30 degree is 0.52359 sin(0.52359) = 0.52359 - 0.52359^3/3! + 0.52359^5/5! - 0.52359^7/7!+ ... (a)Write a function in c++ that takes value of x in degrees and returns the value of x in radians. (b)Write a function in c++ that calculates and returns the factorial of a number.e.g. 3!=6 (c)Write a function in c++ that calculates and returns power of a number. e.g. 23=8. (d)Use the above three functions to find the taylor expansion of sine for in degrees as given above.(Calculate first 3 terms)The following words have three consecutive letters that are also consecutive letters in the alphabet: THIRSTY, NOPE, AFGHANISTAN, STUDENT. Write a program that accepts a word as input and determines whether or not it has three consecutive letters that are also consecutive letters in the alphabet. I got help from expert for this problem. But I would like to see other solution without using len and ord functions if it possiable.
- 4-write functions to write a C++ program for solving the following computational problem: a)-Find the smallest Fibonacci number greater than 1,000,000 and greater than 1,000,000,000.Code in Python Write a function, print_perfect_cubes(n), that takes an integer parameter n and prints the perfect cubes starting from 03 = 0 and ending with n3. When n is negative, the function prints nothing; but do not check for this condition with an "if" statement, it is unneccesary; use a for loop that will automatically print nothing when n < 0. Hint for choosing the right range for your for loop: In the general case, when n is not negative, your function will need to print n+1 different values. For example: Test Result print_perfect_cubes(2) 0 1 8 print_perfect_cubes(5) 0 1 8 27 64 125 print_perfect_cubes(-10)Q2-A) Write a program to plot3 D-spiral to show the relation of the following functions x=sin(t),y=cos(t),z=t, and the interval [O,10Tt],with increasing step Tt/25
- Suppose we have g(n) = 2n and h(n) =n3 Below are a number of statements regarding how the functions grow depending on n and in relation to each other. Which of the above statements is true? A,B TRUE C,E TRUE A,D TRUE C TRUE-Python- Write a function get_letter_grade, such that when given * a lab grade score and * a list of the grade cutoffsreturns the letter grade of that score.Note: Your function automatically returns A for the values that are >= to the first cutoff-value in the list, then A- for the second cutoff-value, B+ for the third and so on. The function returns None for anything that's below the score for B-. You test that get_letter_grade(97, [93, 90, 87, 83, 80]) correctly returns an A, and get_letter_grade(93, [97, 90, 87, 83, 80]) returns A-. DO NOT hard-code the cutoffs, since they can change! You can copy/paste the following template: def get_letter_grade(score, cutoffs): if score ... : return 'A' ...: return 'A-' ...: return 'B+' ...: return 'B' ...: return 'B-'The process of integer division involves two positive integers, N and D, finding a non-negativeresult Q represents the quotient and R represents the remainder. Write a C or C++ program thatsuccessfully compiles and executes using gcc or g++ using the following flow chart. You mustscope the variables as indicated (even though global variables rot) as indicated, and must get thevalues for N and D from the user.Use gloabal variables, the point of this program is to show you that global variables are a lousy practice. Look at the flowchart for more understanding.