Let us know whether any of the following is acceptable for use as a variable name.. If it's not, please elaborate on why. 2ndPlaceName
Q: import random import math Which of the following will assign a random integer from 30 to 90,…
A: In Python, Both random.randint(start, end) and random.randrange(start, end) is used to get a random…
Q: Indicate whether each of the following is a legal variable name. If it is not,explain why. totalCost
A: Identifying the given variable name is legal or illegal: The given variable name is totalCost. If…
Q: Which of the following variable names are written with the convention used in this book?1.…
A: Which of the following variable names are written with the convention used in this book?1.…
Q: What value will be assigned to the x variable? z = 10 !! x = y y or y > z and z < y
A: Correct option is (a and b) because both num and Val's having same length and also num is longer…
Q: Which of the following is/are an incorrect initialisation of a variable? (Choose all that apply)
A: Converting larger range datatypes to Shorter range datatypes needs casting
Q: Class definitions for MonthCalender and DateTimerPicker may be found in the sections that follow.
A: This is useful for calculating the worth of a given date or time. This is a graphical interface for…
Q: If you have been given three arguments - the objective of the stolen item, the name of the pet and…
A: 1. Create a Method with 3 arguments2. Initialize the variable 3. Use the below logic const arr=…
Q: Identify the correct variable name from the following? O a. water depth_ O b. 5waterdepth O c.…
A: The question is related to variable declaration which should be syntactically correct as per the…
Q: Find the wrong statement from the following? O a. Variable can be a keyword O b. Variable is a name…
A:
Q: 6. Which of the following is an invalid variable? a) my_string_1 b) 1st_string <) foo -
A: Given, Choices: my_string_1 1st_string foo _ We have to find among the given choices which is…
Q: Which variables below are syntactically incorrect? MAX _mid…
A: The given variables can be declared as follows –int MAX;int _mid;int double;int var@;int peta;int…
Q: Follow the code below for completion. At the end, what value is contained within the variable x?…
A: Given: int y= 10; int z= 2; double x= (double) y/z; Explanation: An integer variable “y” is…
Q: THIS IS NOT A GRADED QUESTION! Using tkinter how do you code this to make what I posted below?…
A: It is defined as Graphical user interfaces would become the standard of user-centered design in…
Q: In which of the following variable declarations does the declared variable have a value of null? COW…
A: Coded using Java.
Q: will the variable declarations will cause an error? Why? int playerScore = 1340.5;
A: Justification: “Yes”, the given declaration will cause an error because,
Q: What is the type of the following variable? double num = 12.345;
A: There are different types of keywords used in defining the variables such as char, int, float,…
Q: Exercise 4 Using the 3 methods above, create an application that calculates the roots of an equation…
A: GIVEN:
Q: Indicate whether each of the following is a legal variable name. If it is not,explain why. pay_Rate
A: Justification: The given “pay_Rate” is a legal variable name declaration. If the programmer declares…
Q: What is a local variable? Use a piece of code as an example.
A: We are going to understand what are local variables and we will understand it with the help of a…
Q: Which of the following are valid and useable variable names? Explain your answers a. Homework 1 b.…
A: Variables are widely used in solving mathematical equations. They are also used in programming to…
Q: Q2/ Check the validity of the following statements? (use true or false) 1. Current window - This is…
A: Hello student Greetings Hope you are doing great. As per our policy guidelines, in case of…
Q: Which is the object in the statement p.getX() getX() the dot none of the above
A: Find the answer with explanation given as below :
Q: In the following expression, the variable truckWeight has the value 70000 and the variable…
A: Explanation: here truckweight < weightLimit actually trying to compare 70000 < 80000. which is…
Q: Is it true or false? If the compiler encounters a statement that attempts to alter the value of a…
A: Compiler checks all the logical and syntactical error in the code. Constant field value are defined…
Q: Explain why each of the following names does or does not seem like a good variable name to represent…
A: a. stateTaxRate: It is used for representing what it is actually holding so it is a good variable…
Q: Indicate whether each of the following is a legal variable name. If it is not,explain why.…
A: Answer: The given variable name “2ndPlaceName” is illegal because, the name starts with a numerical…
Q: Please declare a variable of the data type int named "myVariable". ( don't add an empty space before…
A: To declare a variable of the data type int named "myVariable"
Q: a) What are the methods that can access the variable age b) What are the methods that can access the…
A: a)What are the methods that can access the variable age Answer:void calculate() b)What are the…
Q: 1. Write down the test cases for the mobile application in the following Format (Black Box Testing)
A: Black box testing: 1) The technique of testing without having any knowledge of the interior workings…
Q: Hello and thank you for taking the time to help with this question! You were right in that I was…
A: Here we have given solution for the question asked. You can find the solution in step 2.
Q: Consider the following code to answer below questions: public double calculatePerimeter(Shapes []…
A: Principle of method is violated in line 1 because when you write the method with parameters it…
Q: Which of the following variable declarations are correct? If a variable declaration is not correct,…
A: To find whether the given variable declaration is correct or not. The given variable declaration…
Q: Indicate whether each of the following is a legal variable name. If it is not, explain why. a.…
A: Justification: a. pay_Rate: The given “pay_Rate” is a legal variable name declaration. If the…
Q: What should be written in Q1? (Adjust nUnits) nUnits = getReverse(nRev); nUnits = 1; nUnits = 0;…
A: B. nUnits = 1
Q: Which one is the declaration of the default constructor for Score? O Score(int = 0); Score(int);…
A: Given:
Q: Which of the following statements declares an object to represent the pseudo-random number generator…
A: Explanation: In VB.NET, the Random class represents a pseudo-random number generator. This…
Q: What is the number of operators that are used to build the condition of the number if * ?it's even…
A: Given:
Q: How many precise digits are saved in a variable of the float or double type?
A: Introduction: We are asked the number of precise digits saved in a variable of float or double.
Q: Which class in the .NET Framework provides predefined named constants that are assigned the…
A: Class that includes predefined name constants assigned with mathematical values: “Math” class is…
Q: Q1/ what is the difference between ? #include #include
A: The #include<cstring> header provides functions for dealing with C-style strings,…
Q: Suppose billingAmount is a double variable, which denotes the amount you need to pay to the…
A: Description: In this assignment, there are four condition need to be followed. 1-If you pay the full…
Q: What is the value of the following expression? 2<5||5<3&&3==5
A: Given: 2<5||5<3&&3==5 Required: What is the value of the following expression?
Let us know whether any of the following is acceptable for use as a variable name.. If it's not, please elaborate on why. 2ndPlaceName
Step by step
Solved in 2 steps
- Evaluate the following expressions and determine the value of allvariables, based on the above variable declarations.The intended purpose of the following module is to determine whether the value parameter is within a specified range. The module will not work, however. Find the problem.An argument is expressed in English below. Rhys will go to the beach. If Rhys is excited; then Rhys will go to the beach. Rhys is excited. Variable names are assigned to each English phrase as follows: p: Rhys is excited •q: Rhys will go to the beach Is the argument valid? If valid, then indicate which rule is used for the argument. If invalid, then give truth assignments to the variables that prove the argument is invalid. Pick 4. Check Next
- What is the value parameter? How is it created?Please submit a flowchart of your program for your project below. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final average or grade. I would like the system to display the…Print this as soon as Code design.
- A retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales exceed 125% or more of their monthly goal of $90,000, then all employees will receive a message stating that they will get a day off. Step 3: Complete the pseudocode by writing the missing lines. When writing your modules and making calls, be sure to pass necessary variables as arguments and accept them as reference parameters if they need to be modified in the module. (Reference: Writing a Decision Structure in Pseudocode, page 118). Module main () //Declare local variables Declare Real monthlySales //Function calls Call getSales(monthlySales) ______________________________________________________ ______________________________________________________ End Module //this module takes in the required user input Module getSales(Real Ref monthlySales) Display “Enter the total sales for…SwapPoints Objective: To write two missing functions that manipulate objects, to complete a given program. I recommend you start early on this and all programming assignments. They are an important part of your grade, and they use material from the notes and exercises we did in the previous module. (They don't relate to this module's notes or exercise.) So your job is to write the two functions below, which are missing from the program: inputNewPlayerLocation: to input (x,y) coordinates from user (using Scanner), then return a Point object with those coordinates. swapPoints: to swap the coordinates of two Point objects. (Hint: To keep the main function's reference variables relevant, you can't swap Point objects entirely. You need to change the x and y coordinates inside the Point objects.)Instructor note: Important Coding Guidelines: Use comments, and whitespaces around operators and assignments. Use line breaks and indent your code. Use naming conventions for variables, functions, methods, and more. This makes it easier to understand the code. Write simple code and do not over complicate the logic. Code exhibits simplicity when it’s well organized, logically minimal, and easily readable. A pedometer treats walking 1 step as walking 2.5 feet. Define a method named feetToSteps that takes a double as a parameter, representing the number of feet walked, and returns an integer that represents the number of steps walked. Then, write a main program that reads the number of feet walked as an input, calls method feetToSteps() with the input as an argument, and outputs the number of steps. Use floating-point arithmetic to perform the conversion. Ex: If the input is: 150.5 the output is: 60 The program must define and call a method:public static int feetToSteps(double…
- Program Specifications Write a FancyCar class to support basic operations such as drive, add gas, honk horn and start engine. fancy_car.py is provided with function stubs. Follow each step to gradually complete all instance methods. Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. The main program includes basic calls to the instance methods. Add statements in the main program as instance methods are completed to support development mode testing. **Step 0: Complete the constructor to initialize the model and miles per gallon (MPG) with the values of the parameters. Initialize the odometer to five miles and the tank to be full of gas. By default, the model is initialized to "Old Clunker", and MPG is initialized to 24.0. Note the provided constant variable indicates the gas tank capacity of 14.0 gallons. Step 1 Complete the instance…Test whether variable count is greater than 20. If it is, display “Count is greater than 20”.This is a picture of the assignment.