COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN: 9780357392676
Author: FREUND, Steven
Publisher: CENGAGE L
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
The University has to shortlist the students for M.Tech programme with scholarship. The candidates will be shortlisted those have done ‘B.Tech’ prior to this, job experience of 2+ years in academics and who have qualified ‘GATE’ exam. Those satisfy all the conditions they will get message Congratulations’, those lack in experience the message they will get ‘apply next time’, others will get message ‘rejected’. Write function call to pass the three above mentioned inputs as arguments with values and functionwill display the applicable message using suitable conditional statements and execute the above code for at-least 10 candidates.
This question should be done using PYTHON Programming language.
/* * * [a,b] - represents a problem state with a gallons in the 4-gallon jug * and b gallons in the 3-gallon jug */
%% You can fill the 4 gallon jug from the faucet, taking you from a%% problem state [X,Y] to a problem state [4,Y],%% provided X < 4.move([X,Y],'Top off 4-gallon jug from faucet',[4,Y]) :- X<4.%%%%2. Rule corresponding to the move 'Top off 3-gallon jug from faucet'move([X,Y],'Top off 3-gallon jug from faucet',[X,3]) :- Y<3.%%%3. Rule corresponding to the move 'Empty 4-gallon jug onto the ground'
%%%4. Rule corresponding to the move 'Empty 3-gallon jug onto the ground'%% 5. Rule corresponding to the move 'Top off 4-gallon jug from 3-gallon% jug'%% 6. Rule corresponding to the move 'Top off 3-gallon jug from 4-gallon% jug'%%7. Rule corresponding to the move 'Empty 3-gallon jug into 4-gallon jug'%%8. Rule corresponding to the move 'Empty 4-gallon jug into 3-gallon jug'
%%%%solution predicates% To solve the problem try this: length(X, Y), Y < 10, solution([0,0],…
Questions.
1. Break is required in the switch statement.
A. True
B. False
2. The expression of the right hand aide of || operators doesn't get evaluated if the left hand side determines the outcome.
A. True
B. False
3. If x is an integer varialble, which value will x = 5/2.0 yield?
A. 2.5
B. 2.00000
C. 2
D. 0
4. The statement for (x=10; x + +) will result to an indefinite loop.
A. True
B. False
5. What is the final value of c when the code: for(x=1; x=
Knowledge Booster
Similar questions
- Look at the code below and provide testcases for 100% statement, branch and condition coverage- Give 10 test cases ref to Facebook functionality by solving above problems. def compute(x,y,z): if (x>2 or y >0) and z=1): x+y-z else: x-y+zarrow_forwardQ.No.1. Write C++ code to handle the following tasks. Students buy lab manuals for three subjects PF, DB and Java. You have to input quantity of PF, DB and Java to be purchased by student, also input selling price of PF, DB and Java lab manuals. After that input whether student is from BIIT or not if user enters “b” (not case sensitive) it means student is from BIIT otherwise student is not from BIIT. Provide 20% discount to BIIT students. Student from other institutes are provided 5% discount if bill exceeds 30,000. You have to display bill without discount, discount amount and bill after discount.arrow_forward(d) Using the IF function, write a formula in J6 to display "Yes" if the activity is critical and display "No" if the activity is not critical. Copy the formula to cells J7:J14. Screen shot attached thanksarrow_forward
- Question: State whether the following are valid switch statements. If not, explain why. Assume that n and digit are int variables. a) switch (n <= 2) { case 0: cout << "Draw." << endl; break; case 1: cout << "Win." << endl; break; case 2: cout << "Lose." << endl; break; } b) switch (digit / 4) { case 0, case 1: cout << "low." << endl; break; case 1, case 2: cout << "middle." << endl; break; case 3: cout << "high." << endl; } c) switch (n % 6) { case 1: case 2: case 3: case 4: case 5: cout << n; break; case 0: cout << end1; break; } d) switch (n % 10) { case 2: case 4: case 6: case 8: cout << "Even"; break; case 1: case 3: case 5: case 7: cout << "Odd"; break; }arrow_forwardOrders for a stock trading system are coded as follows from left to right:1. The first character is 'B' for a "buy" order, 'S' for a "sell" order2. The number of shares to buy or sell3. The stock ticker symbol in all uppercase letters for a "buy" order or all lowercase letters for a "sell" order4. If the order is a "limit" order with a specific buy/sell price, the requested price is in pennies, otherwise the price should be omitted and the order will be a market order at the current asking price for the stock5. If the order is a "limit" order with an expiration time, the character 'T' followed by the number of minutes until the order expires should no longer be executedNote that the order code may only contain letters and numbers. (No comma, hyphen, etc)What would the code be to sell 8000 shares of Veteran Technology Solutions stock (ticker symbol: VTS) at the current market price?arrow_forwardv2 Question 6 What situation calls for a switch statement? Group of answer choices Use a switch statement when the switch statement is inside the main program. Use a switch statement when a for statement can not be used. Use a switch statement when a selection is in a repitition statement. Use a switch statement when a single control value determines which of several possible actions is to be taken. Use a switch statement when a selection is outside of repitition statement.arrow_forward
- Write a single C statement corresponding to each of the following tasks: Declare x and y as float variables with the values of 8 and 20 respectively. Print the value for variable volume in two floating point. Define a constant called POINT with a value of 17. Print the message STAY SAFE!! on the terminal screen starting on a new line. Declare and initialize a double variable named salary.arrow_forwardTHIS PROGRAM MUST BE WRITTEN IN C++! Your customer needs an automated system to patrol the highways. The job of the system is to collect the following information on vehicles traveling down a certain stretch of highway: license plate number, current speed, and speed limit. A program is required to determine if a speeding ticket is needed for each set of data. Ticket will only be issued when number of miles per hours (mph) over the speed limit is at least 5 mph. Ticket prices are calculated as follow: base + fee * <number of mph over the speed limit>. The base is always $150 and the fee per mph over the speed limit is varied according to number of mph over the speed limit. The fee per mph over the speed limit is $5 when number of mph over the speed limit is no more than 20 mph. However, the fee per mph over the speed limit is $10 when number of mph over the speed limit is between 20 mph and 50 mph. In addition, a ticket of $1000 is automatically given to vehicle when number of mph…arrow_forwardCHALLENGE ACTIVITY 4.4.5: Multi-branch if-else statements: Print century. Write an if-else statement with multiple branches.If year is 2101 or later, print "Distant future" (without quotes). Otherwise, if year is 2001 or greater, print "21st century". Otherwise, if year is 1901 or greater, print "20th century". Else (1900 or earlier), print "Long ago".Sample output with input: 1776 Long agoarrow_forward
- 2a - Determine the weakest precondition for the following sequence of expressions. Pleaseprovide all your work including calculations, logic implications if any applies, and final answer.(10 points){ ? } a = 4 * (3 * b - a); b = 4 * a - 6; { b > 10 }2b - Determine the strongest precondition for the following if-else statement. Please provide allyour work including calculations, logic implications if any applies, and final answer. (15 points){ ? } if (x > y) then y = 2 * x - 1 else y = 3 * x + 1; {y>7}arrow_forwardBelow are two basic blocks of code. Variables used include w, x, y, and z. For each block, determine which variables local to the block are live and which are dead as the statements execute (this is not global liveness analysis). 1. x = 3; y = 4; z = 5; 2. x = y + z; y = x * z;arrow_forwardConsider the following four expressions: (a < 10) & (a > 10) not(a == 10) (a < 10) | (a >= 11) (a < 10) | (a > 10) Assume that a is an integer type variable. Three of these expressions are equivalent to each other, meaning that they will produce the same logical TRUE or FALSE result regardless of the value of a. One out of four will not produce the same result as the other three. Which one is it? (a < 10) | (a > 10) (a < 10) & (a > 10) (a < 10) | (a >= 11) not(a == 10)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- COMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage