1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mrrafil [7]
3 years ago
6

Java-Script Concept quiz:

Computers and Technology
1 answer:
In-s [12.5K]3 years ago
5 0

Answer:

Explanation:

1) the versions of JavaScript that are fully supported by all modern browsers ( Except internet explorer 9) are:

C. ECMAScript 3, ECMAScript 5

2) JavaScript is used to implement complex features on a_____

A. web page

3) computer programming tools that are used to store data are called____

C. variables

4) var name = Scott; is the code to create a ____ called "Scott"

D. None of the above

Scott is a variable

5) the key difference between "var" and "let" variables is that____

D. None of the above  

let is used to redefine a variable by using var to redefine may cause problems

6) Hoisting in JavaScript is the process whereby declarations get moved to the____

C. top

7) Im JavaScript, "/ /" is used to code____

A. comments

8) ______ data types have two potential values - true and false.

D. None of the above

Boolean is the data type and null is always false

9) Using ____ gives coders the ability to query data set data to create blueprints.

C. consoles

The Console object provides access to the browser's debugging console.

You might be interested in
Write a for loop that iterates from 1 to numbersamples to double any element's value in datasamples that is less than minvalue.
CaHeK987 [17]

Answer:

function dataSamples=AdjustMinValue(numberSamples, userSamples, minValue)

dataSamples=userSamples;

%for loop

for i=1:numberSamples

%checking if dataSamples value at index,i

%is less than minValue

if dataSamples(i)<minValue

%set double of dataSamples value

dataSamples(i)= 2*dataSamples(i);

end

end

end

Explanation:

The given code is in MATLAB.

4 0
3 years ago
The game begins with the player having 20 POINTS
kompoz [17]

Answer:

Following are the code to this question:

import random#import package for using random method  

def rolling_dice(): #defining method rolling_dice that uses a random number to calculate and add value in dice1 and dice2 variable

   dice1 = random.randint(1,6)

   dice2 = random.randint(1,6)

   return dice1 + dice2

def rolling(): # defining method rolling

   n_roll = 0  # defining num variable that initial value that is 0.

   p = 20 # defining variable p for looping, that points in between 1 and 59

   while p > 0 and p < 60: # defining loop that counts value dice value two times  

       d = rolling_dice()#defining d variable that hold method value

       n_roll+= 1 #defining n_roll that increment n_roll value by 1

       if d == 7 or d == 11:# defining if block that uses the d variable that checks either 7 or 11, player won d in p variable

           p+= d   # use p variable that adds d variable

       elif d == 2 or d == 3 or d == 12:#defining elif block to that checks d variable by using or operator  

           p-= d#defining d variable that decreases d variable variable

       else: # defining else block

           p1 = d # using p1 variable that store d value  

           while True:# defining loop that calculates values

               d = rolling_dice()#defining d variable that holds method values

               n_roll += 1 #increment the n_roll value by 1

               if d == 7:#defining if block that checks d value equal to 7

                   p -= p1#subtract the value of p1 in p variable  

                   break # exit loop

               elif d == p:#defining elif block to check d value is equal to p

                   p += p1#adds the value of p1 in p variable  

                   break#using break keyword

   if p<= 0:#defining if block that checks p-value is less then equal to 0  

       print('Player lost')#using print method

   elif p>= 60:#defining else block that checks p-value is greater than equal to 60

       print('Player won')#using print method to print the value

   print('number of dice rolls:', n_roll)#use print method to print n_rolls value

rolling()

Output:

Player lost

number of dice rolls: 38

Explanation:

In the above-given python code, a method "rolling_dice" is declared, inside the method two-variable "dice1 and dice2" is declared, that uses the random method to calculate the value in both variable and use the return keyword to add both values.

  • In the next step, another method the "rolling"  is declared, inside the method "n_roll and p" is declared that assigns the values and use the two while loop, inside the loop if block is defined that calculates the values.
  • In the next step, a condition block is used that stores value in the p variable and use the print method to print the "n_roll" value.  
8 0
3 years ago
The declarations and statements that compose the method definition are called the __________.
Fiesta28 [93]

Answer:

a. method body.

Explanation:

A method contains the following components:

  • method name
  • method arguments
  • method return type
  • method implementation code

All of these together constitute the method body. The method body contains the declarations and statements constituting the method definition.

Apart from this, when the method is invoked at runtime, it needs to be called with method-name and the actual parameter list which gets substituted for the formal parameters in the method body.

8 0
3 years ago
Is greedy algorithm non deterministic by nature?
Flura [38]

Answer: Yes

Explanation: Greedy algorithm is the algorithm that gives the solution to the problem on the basis of the piece by piece or step by step architecture.  the next step of the solution is based on the aim of solving problem optimally.But the steps chosen can be correct or incorrect.

Non-deterministic nature is the feature that determines that the  steps that is being chosen is not the most optimal one and no high surety is present.Thus, this nature is present in the greedy algorithm and it has non-deterministic nature.

7 0
3 years ago
Which of the following can ensily reverse motion and are better at varying speeds than electrical motors?
harkovskaia [24]

Answer:

Where are the following? You have to post the full question if you want help.

Explanation:

7 0
2 years ago
Other questions:
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • Count the number of words in the string. A word is one or more non-blank characters separated by one or more blanks. My suggesti
    13·1 answer
  • Select what's true about Search Engine Companies. Check All That Apply The information contained in a search engine database is
    12·1 answer
  • What is 36 Denary in Binary?? PLEASE ANSWER I WILL GIVE U BRAINLY!!
    9·2 answers
  • Midday is a good time to take a portrait outside.<br> true or false?
    8·1 answer
  • What font family is Times New Roman an what font family is Arial?
    9·2 answers
  • Help brainleist giving exam
    15·1 answer
  • What is the main function of the output on a computer or what is it use for? ​
    15·2 answers
  • If you select one slice of pie in a pie chart, you have selected a ____
    13·2 answers
  • You are the administrator for the ABC Company. You are looking to install Windows Server 2016, and you need to decide which vers
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!