1. Program the following. Make the number guessing program with switch case. Make an alphabet guessing program using if-else. Complete the simple calculator program for multiplication and division. Also make it using if-else. Make your resume such that in the name field it does not accept anything else than alphabets and space bar. Look át the scenario below.
Q: that prints out a flood map, showing which of the points in the terrain would be flooded if the…
A: floodMap method:- public static void floodMap(float[][] heights,float waterLevel){…
Q: Write a java program to find the penultimate word of a sentence. You have to take user input for…
A: Requirements:- Approach:- Penultimate is the last seccond word. SO we have to take user input and…
Q: Write a program which separates sentence, “there is a cat", into words as shown below. Output there…
A: PROGRAM INTRODUCTION: Use the required libraries and include them. Start the definition of the main…
Q: Let's begin with a lesson in roulette. Roulette is a casino game that involves spinning a ball on a…
A: Given The answer is given below.
Q: What is the execution of the following co mport math K-4 Y=math.pow(X,2) print (Y)
A: It is defined as an interpreted, object-oriented, high-level programming language with dynamic…
Q: What is the scope of the variable number? (Type your answer as two line numbers with a comma…
A: Scope of variable is defined as the part of code in which the variable is being used.
Q: Draw the CFG of the following example and write four test paths of the following example. for (int…
A:
Q: Write a code Matlab to read four marks to student and print a good mark if the mark is greater than…
A: if <expression> % statements(s) will execute if boolean expression is true <statements>…
Q: Write a Java program to Give different target values which shows both successful and not successful…
A: Algorithm- import all files. create class search and enter the number in array by user. scanning…
Q: Write a Java program to take 2 strings from the user and check whether the first string ends with…
A: Required:- Write a Java program to take 2 strings from the user and check whether the first string…
Q: Ancay youyay eakspay igpay atinlay? (Can you speak pig latin?) If you can’t, here are the rules: If…
A: # tranlate methoddef translate(word): punc = '' # to check if punctuation is present if not…
Q: iii. Consider the expression T|F^ T. In how many ways can the expression be parenthesized so that…
A: Question iii. Consider the expression T | F ∧ T. In how many ways can the expression be…
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables and other variables for…
Q: 2\Write a program using MATLAB to enter the grades of the first semester with an assessment for each…
A:
Q: Write a program to define two integer variables and assign values to them (you can use any values…
A: Here, first you need to declare all variables i.e 2 integer variables (a and b) and other variables…
Q: Q6. Write a program on difference among if and switch in Java Language.
A: If statement: It is a conditional statement. It checks for the condition under if If true, the…
Q: What is the result of the following Boolean expression, given that x = 2, y = x**3, and z = y**1/3?…
A: The answer is
Q: make a program game using c++, that allow the player to complete a missing word
A: Make a program game using c++, that allow the player to complete a missing word.
Q: • Modify the previous program such that only the users Alice and Bob are greeted with their names.…
A: Please Provide the previous program.
Q: Write the output of the following program let name = 'Juliya'; { let name = 'Oliviya'; }…
A: Required:- Write the output of the following programlet name = 'Juliya';{ let name = 'Oliviya';}…
Q: Write a program that finds the first unmatched closing bracket which either does not have an opening…
A: Python programming is a high-level interpreted programming language, It's also used to build…
Q: A provable formula B is denoted by (you can write the answer in the paper and picture that answer…
A: Answer in step2
Q: Write a java program to take the string and word from user and check whether the string starts with…
A: startsWith is the method in java available in String class to check whether the given string starts…
Q: Sentinel Using the whileisentinel approach, write a program that will read a line and print that…
A: Java used to answer this question.
Q: 3. Suppose you buy 100 shares of a stock at $12 per share, then another 100 at $10 per share, and…
A: To solve the above problem, we had used do-while loop so that the user can enter the values till it…
Q: import java.lang.*; import java.util.*; public class MoneyInBank { public static void main(String[]…
A: For the above output, the answers should be:- Answer-1:- annualRate should be initialized with 0.05…
Q: write oop find result x!+power(x,y) if x in class a and y in class b
A: // Code class A{ public int x=5;}class B{ public int y=3;} public class Main{ public static…
Q: Write a program that reads a list of scores and then assigns gradesbased on the following scheme:The…
A: Given: Write a program that reads a list of scores and then assigns gradesbased on the following…
Q: event that |a|>0 (the length of the string an is more prominent than nothing), erase the principal…
A: Here have to determine about the program for the string an is more prominent problem statement.
Q: A proposition Q follows from a proposition P, if Q is never false when P is true. Suppose we want to…
A: A proposition Q follows from a proposition P, if Q is never false when P is true. Suppose we want to…
Q: Write a Java program to get a sub string of a given string. Print the original string, and the sub…
A: Simple Algorithm: Step1:Start. Step2:Take or read String as input. Step3:print SubString from given…
Q: Write a program that reads a person's first and last names, separated by a space. Then the program…
A: The program will read entered name and stores into a variable. using the split method, it splitas…
Q: Where did I go wrong? And what to fix?Also please give me the solution with explanation. Show the…
A: Given: code Required: to find the issue in the code and correct it. explanation: there is no need…
Q: Complete the simple calculator program for multiplication and division. Also make it using if-else.
A: As per our company guidelines, we are supposed to answer only one question per question and kindly…
Q: (3) (a) A fair coin is flipped, if it lands on the head side, one dice is rolled and X is the…
A: a) A fair coin is flipped,if it lands on the head side,one dice is rolled and X is the resulted…
Q: the following Boolean expression: ? =
A: Boolean expression: ? = ??′? + ??′? A+´AB=1. ´AB(A+ˊB)(ˊB+B)=ˊA. ( A+C)(AD+AˊD)+AC+C=A+C. A+AB=A.…
Q: Write a C++ program that read in students Test Grades, print the corresponding Letter Grades and…
A: #include <iostream> using namespace std; int main() { int grade; cout<<"enter the…
Q: Write a program to implement this scenario: There is a water filter which is adding 10L water in one…
A: Answer: I have done code and also I have attached code as well as output . this program is not a…
Q: Write a java program to help the student to arrange his Diploma Marks of 12 subjects from high to…
A: Ascending order: Sorting the elements of the array from low values to high values is called…
Q: 4. Write a program which to find the grace marks for a student using switch. The user should enter…
A: /****************************************************************************** Welcome to GDB…
Q: Can someone help with that in cpp Write a program that finds all the ways in which the mouse can…
A: C++ program to build the recursive function that returns all the ways in which the mouse can move to…
Q: Write a program in java to find the largest of three number given with out using if-else. Please do…
A: Requirements :- Write a program in java to find the largest of three number given with out using…
Q: Write a C program: In a class of n students print the total no. of female students and total no. of…
A: Code: #include <stdio.h>int main(){ //declaring required variables int n1,n2,total;…
Q: For your first program, you are to write a simple Dodgeball simulation. In this simulation, we will…
A: Code: import java.util.Scanner;public class Dodgeball{ public static void main(String[] args)…
Q: In programming, we use the mask concept to indicate information that can be shown to the user and…
A: In programming, we use the mask concept to indicate information that can be shown to the user and…
Q: Let's begin with a lesson in roulette. Roulette is a casino game that involves spinning a ball on a…
A: Answer: 1. What is the expected value of a bet on a single number if we bet $1? If we bet $1 on a…
Q: Implement the following if-elif-else-nested-if conditions. Create a program that asks the user the…
A: # taking input from user and convert it to lower case fullyVac = input("Are you fully vaccinated ?…
Note: write down c
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Correct answer will be upvoted else downvoted. Computer science. You are given a positive integer x. Check whether the number x is representable as the amount of the solid shapes of two positive integers. Officially, you really want to check in case there are two integers an and b (1≤a,b) to such an extent that a3+b3=x. For instance, in the event that x=35, the numbers a=2 and b=3 are reasonable (23+33=8+27=35). In the event that x=4, no pair of numbers an and b is reasonable. Input The primary line contains one integer t (1≤t≤100) — the number of experiments. Then, at that point, t experiments follow. Each experiment contains one integer x (1≤x≤1012). Kindly note, that the input for some experiments will not squeeze into 32-cycle integer type, so you should use something like 64-bit integer type in your programming language. Output For each experiment, output on a different line: "Indeed" in case x is representable as the amount of the 3D shapes of two…Once you have a list of all the mathematical operations, you may put them in a sensible order.About that program in the picture can you solve the follow-up question in the other picture, please. Thank you
- Q49. Write a program which replace all the words "man" with "woman". Sample Text: That is a strong man.This is basically something that has a certain number of states (sort of like how a traffic light can be Red, Yellow, Green) and changes from one state to another.This program will have 4 states: HAPPY, HUNGRY, BORED, SAD. Here are the rules. Our animal starts in a state of Happy, with the values for hungry = 0 and bored = 0. Each round the player can "feed", "play" or "ignore" their animal. If they feed their animal, then the hungry meter goes down and bored meter goes up. If they play with their animal, then the bored meter goes down and the hungry meter goes up. If they ignore their animal, then both hungry and bored go up. Don't go below 0 Here are the state changes. Each one of these is a "case" in a switch (from current state -> new State):HAPPY If hungry >= 2 transition to HUNGRY If bored >= 2 transition to BORED HUNGRY if hungry >= 4 transition to SAD if bored > hungry transition to BORED if hungry < 2 transition to HAPPY BORED If bored >= 4…A provable formula B is denoted by (you can write the answer in the paper and picture that answer upload it here).
- 1. In the game of Monopoly, a pair of dice are rolled to move a player's piece around the board. If a double is rolled (the dice show the same number), the player receives another roll of the dice. If a double is rolled a second time, a third roll of the dice is received. If a double is rolled on the third occasion, the player forfeits their turn (and goes to Jail). Write a program which simulates two players having 50 turns each (a turn however many dice rolls a player has in a row before it's the other player's turn) and determines: a) the total number of spaces moved by each player; and b) how many times a player rolls a double which results in movement of a piece. Use the randi function. For fun, incorporate the rule that a player cannot leave Jail (cannot move) unless they either roll a double or three turns have passed without rolling a double.In this lab work, you will implement a coffee shop example. In this coffee shop, everything must progress as if it does in real life. It means that the program should ask a person for body temperature in Celsius, and grant or reject access to a coffee shop. When a customer orders a coffee, they have to choose a size such as Small, Medium, and Large then, depending on the order, the price has to change. The price also has to change depending on the type of coffee. For example, for coffees that are similar to espresso, you also need to take every shot of espresso into account. The actual prices of the coffees depend on your imagination however, they should be realistic. Some hints: • Focus on dividing your program into multiple functions. • You can also return double or integer types of values from your functions, so use them if you can. • Don't just code a function every possible type of, and try to make it generic as much as possible. • Be creative. Fill the gaps using your…Write C Program the following. Complete the simple calculator program for multiplication and division. Also make it using if-else. Make your resume such that in the name field it does not accept anything else than alphabets and space bar. Also attach the screenshots of the output.
- Write a program that draws a star, as shown in Figure 6.11b.Use the drawLine function defined in Exercise 6.38.Modify the guessing-game program of Section 3.5 so that the user thinks of a number that the computer must guess. The computer must make no more than the minimum number of guesses, and it must prevent the user from cheating by entering misleading hints. (Hint: Use the math.log function to compute the minimum number of guesses needed after the lower and upper bounds are entered.)Make explanations in the lines of the program where explanation is requested with (;).Also briefly describe what the whole program does.