10. What scope does the variable var have on lines 1, 3, 4, 8, 9, 12, 13, 19 and 20? What values will be printed by lines 4, 9, 12 and 20? 1 var = 10 2 def fun_a(): 3. var = 2 4. print(var) print("printing...") 7 def fun_b(var): print(var + 5) 8 9. 10 11 def fun_c(): 12 print(var) 13 return var 14 15 print("printing again...") 16 fun_c() fun_a() fun_b(var) print(var) 17 18 19 20
Q: Javascript I want the output to be in one line instead of printing it in every new line ----…
A: Answer
Q: Task 8 Write a Cylinder class to get the desired output as shown below. 1. You will have to create a…
A: The code is
Q: PROBLEM: Create your own massive multiplayer online game (MMORPG) hero. Use a class named…
A: In this question we have to program a C++ class code in which using the First Name, Middle Name and…
Q: 1) How do you get the current URL in JavaScript? A) window.location.a B) window.location.currentURL…
A: Explanation of all the above-given options: A) window.location.a: No, such command is available…
Q: In the processing app (JAVA), create a variable called theta that keeps the value of it from 0 to…
A: logic:- use while(true) loop to run loop until condition meets. Display theta value from 0.…
Q: what will be the output of this code after clicking on Button1? Public Class Form1 Dim grade…
A: Visuаl Bаsiс fоr Аррliсаtiоns is а соmрuter рrоgrаmming lаnguаge develорed аnd оwned by…
Q: import turtle window = turtle.Screen() t = turtle.Turtle() t.hideturtle()…
A: Below is the answer with explanation:
Q: At the end of this specific task, students should be able to: • Create and work with Loops • Handle…
A: The class Task is provided in the next step
Q: method5 that accepts a string as its parameter an vo letters of the parameter) in upper case…
A: Approach To convert the last two characters of a string "upperCase" in upper case, we will use the…
Q: Question 2: Write a J2ME program to display the Canvas line and when command "choose" is selected…
A: Actually, program is an executable software that runs on a computer.
Q: In main(), prompt the user for two items and create two objects of the ItemToPurchase class. Before…
A: In main(), prompt the user for two items and create two objects of the ItemToPurchase class. Before…
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: Sample Response: //Java program to find the sum of each row by using functionspackage scorer; import…
Q: 12.7 Find any errors in each of the following lines of code, and explain how to correct them. a)…
A: Find any errors in each of the following lines of code, and explain how to correct them. a) import…
Q: PART B: Create two linkedBag objects of type string in main. Place 5 strings in the first bag and…
A: PART-B import java.util.Iterator;import java.util.NoSuchElementException;public class…
Q: Select a number (ranging from 0 to 99999): Seperate The seperated digits in the number are:
A: To separate integers, I have used the function seperate(int n) I don't know the textfields name so I…
Q: Task 8 Write a Cylinder class to get the desired output as shown below. 1. You will have to create a…
A: Given:
Q: You have been provided with a QTCreator project called Project12 _ Student. Open the project in…
A: #include <bits/stdc++.h>using namespace std; class infostation{ public: float getTemp()…
Q: I need help with this. Thanks in advance. Write an application that accepts a word from a user and…
A: given import java.util.*;public class PigLatin {public static void main(String[] args) {// Write…
Q: In JavaScript, the following variable is defined. var student = {name: "Joel", admission: 2021}…
A: Following statements is/are true: a. student instanceof Object; ** Statement: d. typeof student is…
Q: PROBLEM: Create your own massive multiplayer online game (MMORPG) hero. Use a class named…
A: Hey . I have coded the said problem in C++ and each of your question requirements has been…
Q: What will be the value of x if we execute this: String s = "25"; int x = Integer.parselnt(s); ?…
A: s = 25 of type string. further it is parsed into type Integer. it is valid way in java. so, CORRECT…
Q: Which java keyword is used to refer a class’s hidden data fields? super static void this
A: Task :- Choose the correct option for given question.
Q: Carly's Catering provides meals for parties and special events. In Chapter 3, you created an Event…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: PROBLEM: Create your own massive multiplayer online game (MMORPG) hero. Use a class named…
A: In this question we have to write a C++ program in which we have been asked to create a constructor…
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: Program:import java.util.Scanner; public class Scorer{ public static void main(String args[]) {…
Q: what will be the output of the following code assuming CheckBox2 was selected ? Public Class Form1
A: We need to answer - what will be the output of the following code assuming CheckBox2 was selected ?…
Q: Build the ItemToPurchase dlass with the following specifications Attributes item_name (string) item…
A: Source Code: # ItemToPurchase class ItemToPurchase: icount = 0 # number of items in the…
Q: What is the value of numltems after the below code is executed? Iten jar new Iten(); Iten ball ne…
A: Here the variable numItems is a static variable. Thus it will be initialized only once and will be…
Q: ecall the SpecificBox. When testing your class, what is the minimum number of test cases that should…
A: Test cases are used for testing the program that the program is evaluating all the test cases with…
Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File…
A: The Java program and the program plan to calculate the average of the elements of three rows of a…
Q: The javascript code below creates just a single bomb. How can we create many bombs at a random using…
A: In the given code, random number is generated using Math.ceil(Math.random() * window.innerWidth) +1…
Q: According to the following, which is a valid way to call the displayIt method? private int…
A: Answer: Explanation: A display method is not a physical field in a table but rather a method of…
Q: Write a method that calculates and prints both the maximum humidity and maximum temperature values…
A: ANSWER:-
Q: 18 - final question Given the following Windows Form Application Ctor 2 And given button "2" click…
A: String.compare returns 0 if both strings are equal.
Q: Task 8 Write a Cylinder class to get the desired output as shown below. 1. You will have to create a…
A: This is done in Python Language.
Q: The Add-Computer command has how many parameter sets? Within those parameters are there any that are…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: start a new game
A: ANSWER:
Q: What will be the output of the following code? Private Sub Form1_Load(sender As Object, e As…
A: - The question is to direct tye correct output of the provided code. - In the provided code the…
Q: What does this code produce? FOR varName, DWORD varName ENDM
A: It is used to Create Five (monday,tuesday,wednesday,thursday,friday) DWORD variable. Here Each…
Q: Write an application that counts by five from 5 through 500 inclusive and that starts a new line…
A: Actually, program is a executable software that runs on a computer.
Q: Write a method that calculates and prints both the maximum humidity and maximum temperature values…
A: ANSWER:-
Q: In Racket, which of the following contains (or is by itself) a call of a selector for the defined…
A: In Racket, which of the following contains ( or is by itself ) a call of a selector for the defined…
Q: how many card objects to be instantiated
A: Object instantiation in java Instantiating means creating an instance of a specific class in java.…
Q: Create a driver in which the following lines code will be realized without errors Console.WriteLine…
A: An abstract class is, conceptually, a class that cannot be instantiated and is usually implemented…
Q: You have been provided with a QTCreator project called Project12 _ Student. Open the project in…
A: Program description : The program contains the three files 1.Header file : infostation.h…
Q: You have been provided with a QTCreator project called Project12 _ Student. Open the project in…
A: Actually, the code has given below:
Q: class Circle: def -_init__(self, r=5): 3 self.radiuS = r def get_radius(self): return self.radius 7…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: The class InfoStation contains 3 public methods namely : float getTemp ( ) ; - Returns a random…
A: CPP programming language : C++ is a cross-stage language that can be utilized to make superior…
Step by step
Solved in 2 steps with 2 images
- Question: How can I make this code work on the windows form application, can anyone help me edit my code so that it runs? Thank you. My Attempt: private void button2_Click(object sender, EventArgs e){n = Int32.Parse(textBox1.Text);i = 4;int[] arr;arr = new int[5];while (i > -1){arr[i] = n % 10;n = n / 10;i--;}foreach (int j in arr)textBox2 = (" " + j);} Question: Write a function Seperate( number ) that separates an integer number (ranging from 0 to 99999) into its digits. For example, if the number is 42329, the function finds 4, 2, 3, 2, 9. If the number is 323, the function finds 0, 0, 3, 2, 3. (Hint: use modulus and integer division operations.)3. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here} moveCharacter(x: 0, y: 0, facing: .southwest) moveCharacter(x: 0, y: 0, facing: Direction.north) moveCharacter(x: 0, y: 0, facing: .south) moveCharacter(x: 0, y: 0, facing: Direction.northeast)13.16.2: Convert a height into inches. Write a second ConvertToInches() with two double parameters, numFeet and numInches, that returns the total number of inches. Ex: ConvertToInches(4.0, 6.0) returns 54.0 (from 4.0 * 12 + 6.0). code: #include <iostream>using namespace std; double ConvertToInches(double numFeet) { return numFeet * 12.0;} /* Your solution goes here */ int main() { double totInches; totInches = ConvertToInches(4.0, 6.0); cout << "4.0, 6.0 yields " << totInches << endl; totInches = ConvertToInches(5.8); cout << "5.8 yields " << totInches << endl; return 0;}
- Using comments within the code itself, can you provide an line by line explanation of the below JavaScript file? The file itself deals with WebGl and if that helps you. Please and thank you JavaScript file: function MVbuffer(size) { var b = {}; b.buf = new Float32Array(size); b.index = 0; b.push = function(x) { for(var i=0; i<x.length; i++) { b.buf[b.index+i] = x[i]; } b.index += x.length; b.type = ''; } return b; } function isVector(v) { if(v.type == "vec2" || v.type == "vec3" || v.type == "vec4") return true; return false; } function isMatrix(v) { if(v.type == "mat2" || v.type == "mat3" || v.type == "mat4") return true; return false; } function radians( degrees ) { return degrees * Math.PI / 180.0; } //---------------------------------------------------------------------------- function patch() { var out = new Array(4); for(var i = 0; i< 4; i++) out[i] = new Array(4); out.type = "patch"; return out; } function curve() { var out = new Array(4); out.type = "curve";…Please answer the correct option and its reasoning. int loc; String str = "The cow jumped over the moon."; loc = str.indexOf("ow"); What is the value of loc? 1. 5 2. 6 3. 4 4. 7A. When you use the regular expression/(\w+)\s(\w+),?/gto match substrings, information about the substring matched by the first(\w+)group is stored in the$1property of the associated JavaScriptRegExpobject. Select one: True False B. The lexical scope of variables, functions, and other objects _____. a. is different from their static scope, also known as local scope b. is based on their physical location within the source code c. prevents the JavaScript interpreter from looking for them outside their innermost reference in a program d. allows the JavaScript interpreter to access local variables from anywhere in the program
- Modify songVerse to play "The Name Game" (see OxfordDictionaries.com), by replacing "(Name)" with userName but without the first letter.Ex: If userName = "Katie" and songVerse = "Banana-fana fo-f(Name)!", the program prints:Banana-fana fo-fatie! Ex: If userName = "Katie" and songVerse = "Fee fi mo-m(Name)", the program prints:Fee fi mo-matie Note: You may assume songVerse will always contain the substring "(Name)" #include <iostream>#include <string>using namespace std; int main() {string userName;string songVerse; getline(cin, userName);userName = userName.substr(1, userName.size() - 1); // Remove first character getline(cin, songVerse); // Modify songVerse to replace (Name) with userName without first character /* Your solution goes here */ cout << songVerse << endl; return 0;} Please help me with this string operations problem using C++.11. Write a line of code to save the value of the textarea in the signUp object field for allergies. 12. Write a line of code to assign the form radio buttons using querySelectorAll to a variable called radioButtons.In Racket, which of the following contains (or is by itself) a call of a selector for the defined movie struct? (Select all that apply)A) (make-movie "Beauty and the Beast" "Gary Trousdale" 92 true)B) (movie-dvd? LION)C) (check-expect (movie-length TOY) 81)D) (movie? 81) (define-struct movie (title director length dvd?)); a Textbook is a (make-book String String Natural Boolean); interp: a movie where; title is the movie’s title; director is the name of the movies’s director; length is the length of the movie in minutes; dvd? is whether the movie is available in dvd format (if true)(define TOY (make-movie “Toy Story" "John Lasseter" 81 true))(define LION (make-movie "The Lion King" "Rob Minkoff" 89 false))
- In the langauage R: Which of the following statements is NOT correct about themes in R? Select one: Once set, a theme applies to all subsequent plots and remains active until it is replaced by a different theme The theme_set() function takes the name of a theme as an argument If we want to change the overall look of the figure all at once, we can use ggplot’s theme engine The theme_minimal() function can make ggplot output look like it has been featured in the Wall Street JournalCould you please fix this error? <div className="form-group"> <h1> Inventory </h1> <label for="nameInput">Name</label> <input type="text" name="name" value={this.state.name} onChange={this.handleNameChange} className="form-control" id="nameInput" placeholder="Name" /> </div> Error: that for the showing error. (property) for: string Type '{ children: string; for: string; }' is not assignable to type 'DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>'.Property 'for' does not exist on type 'DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>'. Did you mean 'htmlFor'?ts(2322) View Problem (Alt+F8) Quick Fix... (Ctrl+.)4.6.2: Convert a height into inches. Write a second convertToInches() with two double parameters, numFeet and numInches, that returns the total number of inches. Ex: convertToInches(4.0, 6.0) returns 54.0 (from 4.0 * 12 + 6.0).