d to write output to the
Q: What output is produced by the following code?int key = 1;switch (key + 1){case…
A: PROGRAM CODE: public class Main{ public static void main(String[] args) { int key = 1;switch (key +…
Q: Suppose that the input is: 12 What is the output of the following code? Assume all variables are…
A: Here in the code we have taken input from the user and stored it in three variables a = 6, b = 9,…
Q: What is the stored in the object obj in following lines of Java code?
A: Question. What is the stored in the object obj in following lines of Java code? box obj;
Q: What is header file used for? Answer Choices: a. It is used to work with command line arguments. b.…
A: A header file is a file with extension . h which contains C function declarations and macro…
Q: Your Science Teacher wants you to create a simple application. In the program, it will accept the…
A: I have provided code and output in step 2.
Q: Write a shell script to print good morning/good afternoon/good evening/good night based
A: check=`date +%H`echo $checkif [ $check -ge 06 -a $check -le 12 ]then echo "Good morning"elif…
Q: What will be displayed in the console, given this code?
A: The output of the above code is : 5 6 7 8 9 for(int ctr = 5; ctr<num; ctr++) { if(ctr *…
Q: would this be by event handler? function doOnChange(myObj) { if (typeof console == "object") {…
A: Answer: Yes, the above code is the event handler. It runs the same tag object. Example event:…
Q: Which kind of language allows variable types to change during runtime? Markun
A: Dynamically typed
Q: Which of the following if remove in the c# program will not affect the execution even if it not…
A: The given question are multiple choice selected question.
Q: Assume userName equals “Tom” and userAge equals 22. What is printed on the console when the…
A: Java program of the given problem is as follows: import java.util.Scanner;public class Main{ public…
Q: In which cases you don’t see plugin menu?
A: Introduction: Plugins are tools developed by the WordPress community to enhance the platform's…
Q: E.g., filename: part.text Brasstown Bald ,(summit),4784,feet,Union County Rabun Bald,…
A: vi editor: It is used to edit an existing file or create a new file from scratch.
Q: Which command is used to see if a command is a shell function?
A: eco command is used for see function and data in shell programmin
Q: Which directive displays a message on the console during the assembly step?
A: Solution ECHO is the directive that displays a message on the console during the assembly step %out…
Q: please i need confert this code to compiler using System; class HelloWorld
A: //Corrected program: using System;using System.Collections.Generic;using System.Linq;using…
Q: Which of the following is correct about the first parameter of the "main()" function? a) The first…
A: Given: Which of the following is correct about the first parameter of the "main()" function? a) The…
Q: yID which takes employee number as input parameter and returns string. (SQ
A: Create a package named EMP_PS which has a function named findEmpByID which takes employee number…
Q: Which is the correct declaration for m= 123.50, e=”vb programming”, g = 1 and y = m? Select one:…
A: The answer 1)dim m as double, e as string, g as integer, y as double 2)Object.property.value…
Q: What would be the output here and why?What will be the final output in console?Why did you choose…
A: Circle is extending from Shape class So, Circle is a child class which can access the public…
Q: Q2: What is the purpose of the following MATLAB code? Write the content of the Command window and…
A: Purpose of the above matlab code: The S(Sum) is initialised to 0. The program calculate the sum of…
Q: Create a shell script that prints good morning, good afternoon, good evening, and good night…
A: Given that: The topic is about Create a shell script that prints good morning, good afternoon, good…
Q: The Default Escape Character for PowerShell is: Group of answer choices Back Tick/Grave Accent `…
A: Solution : In this question our duty is to find the default Escape Character for PowerShell. So…
Q: You want to view the contents of autoexec.bat on the screen using the "type" command, but it scrolls…
A: Given that: You want to view the contents of autoexec.bat on the screen using the "type" command,…
Q: Tac Toe Game using tkinter and any other necessary Python packages. Please put menu on it (which…
A: It is defined as a interpreted, object-oriented, high-level programming language with dynamic…
Q: Which of the following state transitions are possible? A Running -> Suspended Blocked -> Running C)…
A: The following state transitions are possible: E- blocked->ready F- Running->Ready
Q: write the command that displays a list of the variables currently in the workspace and information…
A: Answer:
Q: What is wrong with the following program? #include <iostream>…
A: Error in the given program: Error #1: In Line 2, “sdt” must be replaced by “std”. the “namespace…
Q: Which of the following types of operation does NOT alter the state of an object? O a. Iterator O b.…
A: Answer: c
Q: uestion 2 Specify if the following is data or information: The temperature dropped 15 degrees and…
A: Data is raw, unorganized fact that need to be processed Information when data is organized…
Q: The syntax below cannot be used to display variable values: Console.WriteLine("The money is ${0}…
A: According to the Question
Q: Purpose: shell programming E.g., filename: part.text Brasstown Bald ,(summit),4784,feet,Union…
A: Sort command in shell programming: SORT command is used to sort a file, arranging the records in a…
Q: Following set of commands are executed in shell, what will be the output?>>>str="hello" >>>str[:2]…
A: This is a python shell based mcq.
Q: ?Which of the following is used to write multi-line comments in Java */ /* O /**/ // ?/
A: Answer :
Q: Given the following data declarations and code (within main), what is printed to the console window?…
A: The Answer is in Below steps
Q: -Which of the following commands are used for external input? Oint Ofor Ofloat Oscanf Oprintf -Which…
A: C programming is a general-purpose programming language and it is called functional programming…
Q: Which of the following will evaluate to true? I. True AND False II. False or True III. False AND…
A: AND Truth Value table- A B A and B True True True True False False False True False…
Q: Which format specifier is used to read input for the following declaration? int price=20; a. %f…
A: Format specifiers They are utilized in C for enter and output. Using this idea the compiler can…
Q: which of the following words are legal variable names in C++, and which are not? And why? x1…
A: Given:- which of the following words are legal variable names in C++, and which are not? And why?…
Q: a What is the testbench and how to use it? b- what are the functions of $display. Smonitor, $finish?
A: Testbench and its use Use of function $display,$monitor,$finish
Q: What will happen if you run a program with an error?
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: How to write the following arguments in the command window? Absolute value of x, In30, et, Round x…
A: Y = abs(x)
Q: Which of the following INT 10h functions scrolls a rectangular window up?
A: INT 10h functions: It is BIOS interrupt. It is also called video service interrupt and controls the…
Q: Which of the following is a correct parameter passing? O O O
A: Answer to the above question is in step2.
Q: What do the following commands do? 1_Format copy 2_text agreement 3_Conditional Formatting
A: In this question we have to explain the commands.⦁ Format copy: ⦁ Text agreement: ⦁ Conditional…
Q: 1.The following will evaluate display false. var a = 1; var b = "1"; console.log(a === b); True or…
A: 1- false var a = 1;var b = "1";console.log(a === b); === (Triple equals) is a strict equality…
Q: Which of the following statements shows the result of executing the following line in the editor…
A: abs() function returns the absolute value of a number.
Step by step
Solved in 2 steps
- Enter an input statement using the input function at the shell prompt. When the prompt asks you for input, enter your first name, observe the results, and explain what happened.WAP to print what user is entered in console . You can choose any programming langauge as you want1. Write a console application that prints the next 20 leap years. A leap year is a year in which an extra day is added to the Gregorian calendar, which is used by most of the world. While an ordinary year has 365 days, a leap year has 366 days. ... A leap year comes once every four years. Because of this, a leap year can always be evenly divided by four.
- This assignment will help you to get started with NetBeans and using Java compiler: To begin, put a block comment at the beginning of your Java file (and every Java source file in the future) with the assignment number, assignment title, program author [your name], and the date it's due. Next, similar to the programs presented in the first chapter of the textbook, use System.out object to display the following information: Your first name The name of the operating system you are using The name of your project (or simply the folder name if not using the IDE) The name of the class that contains the main() method in your source file. Note: Your program should print each of the above items on a separate output line. "The name of the class that contains the main() method in your source file.public class MyClass { public static void main(String[]) { System.out.println( "Hi" ); }}Create a C++ console project in Visual Studio or another tool. Create an application that converts a student’s grade percentage to a letter grade following the rules below: Grade Percentage A 100-90 B 89-80 C 79-70 D 69-60 F 59-0 Your code should prompt for and get the student’s percentage as input, and output an error message or a letter grade. Note: Your code should test these cases: Percentages less than 0 – error message. Percentages greater than 100 – error message. Percentages in the range 0-100 – letter grade. Please make sure your code can handle these cases. Tips: Use operator and ‘||’ for the conditional control statement. Use instruction ‘if’ for conditional control. Make the following edits to the code file: Complete the header comment. 2) Declare two double variables: grade and percentage. 3) Assign the value of percentage from input. 4) End program if percentage is smaller than 0 and…When do a programmer refactors his/her code?A.You fully understand the code.B.Prevents you from building on it.C.No bugs to be fixed.D.None of the above
- Can someone write this code? Write your own MineSweeper game, using wxWidgets and C++. This game should consist of a 10 x 10 grid of buttons. When the game starts the buttons should all appear to be plain, until the user clicks the first button. Once the user clicks that first button, the game should load in the hidden mines. Then the first button the user clicked on should display the number that tells the user how many mines surround the first box in the grid that (s)he chose. The user should be able to play the game just like the normal MineSweeper game until either (s)he lands on a mine and the game ends, os until (s)he wins the game by revealing all the squares that do not contain mines. Make sure to use a 24 point font so the numbers are nicely visible. To submit your answer, please paste in all your Source Code into a Word document. Also paste in at least two screen shots from the game; one from the beginning of the game and another showing the message that is displayed when…You are a Chemistry major who has to create a program for first time chemistry lab users. The Erlenmeyer flask contains a nitric acid solution. When the student presses a button, 0.5 mL of NaOH solution can be added to a buret, which is set up over the Erlenmeyer flask. An indicator is added to the solution being titrated. The indicator is a substance that changes to blue when the reaction is complete (endpoint). You determine the amount of mixture that will cause this reaction to occur. Create a titration simulator that will allow a student to add up to 18 mL of titrant. Notify the student when the mixture turns blue. In Python please :)The local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. B 6. A 11. B 16. C 2. D 7. B 12. C 17. C 3. A 8. A 13. D 18. B 4. A 9. C 14. A 19. D 5. C 10. D 15. D 20. A A student must correctly answer 15 of the 20 questions to pass the exam. Write a class named DriverExam that holds the correct answers to the exam in an array field. The class should also have an array field that holds the student’s answers. The class should have the following methods: • passed. Returns true if the student passed the exam, or false if the student failed. • totalCorrect. Returns the total number of correctly answered questions. • totalIncorrect. Returns the total number of incorrectly answered questions. • questionsMissed. An int array containing the question numbers of the questions that the student missed. Demonstrate the class in a complete…
- Develop a C++ class called PrimeNumberGenerator. An object of this class will generate successive prime numbers on request. Think of the object as being similar to the digital tasbeeh counter. It has a reset button which makes the counter return to 0. There is also a button to get the next prime number. On the tasbeeh, pressing this button increments the current value of the counter. In your object, pressing this button would generate the next prime number for display. You’ll implement the reset button as a member function reset() and the other button as a function getNextPrime(). When an object is first created and the getNextPrime() function is called, it will return the first prime number, i.e., 2. Upon subsequent calls to the getNextPrime() function, the subsequent prime numbers will be returned. Define any others functions such as constructor and attributes that you need. According to Wikipedia: “a prime number is a natural number greater than 1, that has no positive divisors…Write down what is the purpose of the following code. What each line/command of the code states.You are to create a Python application that applies the basic concepts in Python. Scenario: You are to create a python application that simulates a toll booth that will give out toll booth tickets to the driver depending on what type of vehicle they are driving. The user will enter their name, destination and vehicle type. The application will then determine what class of vehicle they are driving and assign them the correct fee. The application is to then print out a receipt with the user's name, destination, vehicle class and correct fee. The vehicle types along with their associated vehicle class are listed below: Class 1 Vehicle Car Jeepney Van Pickup Motorcycle Class 2 Vehicle Bus Truck Class 3 Vehicle Tanker Trailer Your application will initially ask for the following information when it is started: The name of the user The destination of the user The type of vehicle for the user The application will assign specific fees depending on the class of vehicle that is…