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
Sati [7]
3 years ago
4

Write a Raptor program that will generate a random number between 1 and 10; do not display the randomly generated number. Let th

e user guess within 3 tries what the random number is. Display hints to help the user, for example "Your guess was too high!". Display appropriate messages based on each try, for example, "1 remaining try" or "You guessed correctly!"
Computers and Technology
1 answer:
Irina18 [472]3 years ago
5 0

Answer:

Using javascript, explanation with javascript comment

Explanation:

function guessNumber(){

var randomize= math.random()*10;

var roundrand= math.floor(randomize);

var getInput= prompt("guess number from 1 to 10");

var x= 3;

do(

if(getInput>roundrand){

Console.log("your guess is too high");

guessNumber();

}

if(getInput<roundrand){

Console.log("your guess is too high");

guessNumber();

}

else{

Console.log("you are correct pal!");

break;

}

)

while(x<=3)

}

/*Observe that we have used a recursive function that calls the function guessNumber again inside the function definition if the input fails the if condition and doesn't guess correctly. It checks for a correct number 3 times with the do... while loop and breaks out of the function once the user enters a correct input.*/

You might be interested in
The customer's endpoint device on the wan is called the __________________.​
Lelu [443]
<span>The customer's endpoint device on the WAN is called the Data Terminal Equipment (DTA).
WAN 
is wide area network, referring to a network that extends over a large area. DTA is an end instrument which converts information into signals.</span>
3 0
3 years ago
The publisher tab in the application control allows you to manage the various certificates that are used to do what to binaries?
artcher [175]

The publisher tab in the application control allows you to manage the various certificates that are used to sign to binaries. Publisher allow executables of a particular vendor, signed by a security certificate issued to the vendor by a Certificate Authority. Also, all applications and binary files either added to or modified on an endpoint that are signed by the certificate are automatically added to the whitelist.

3 0
3 years ago
Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose f
diamong [38]

Answer:

Idk

Explanation:

Idk

8 0
3 years ago
When pasting a circle drawn by the presentation software drawing tool into a spreadsheet, that circle will go into the selected
ivann1987 [24]
The answer is ............................ False
6 0
3 years ago
Read 2 more answers
What keeps unauthorized internet users out of private intranets?
Kruka [31]
I think coders put in codes. Sry if that does not help.
8 0
3 years ago
Other questions:
  • 1) Put the following in order from smallest to largest A) 1,500,000 bytes B) 2,000 kilobytes C) 0.01 petabytes D) 1 Terabyte E)
    8·1 answer
  • What is the most powerful gpu or known as the graphics card in the world?
    8·2 answers
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    5·1 answer
  • Can you block someone on Brainly?
    7·2 answers
  • A network monitor records the following information while recording a network connection.
    9·1 answer
  • Write a function to add two large integers of any length, say up to 200 digits. A suggested approach is as follows: treat each n
    12·1 answer
  • _____ is a subset of a data warehouse in which only a focused portion of the data warehouse information is kept. A. Data diction
    6·1 answer
  • How is counting in this circle and square system similar to how we count in our regular lives? How is it different?
    15·1 answer
  • Tomahawk Industries develops weapons control systems for the military. The company designed a system that requires two different
    13·1 answer
  • Krya needs help deciding which colors she should use on her web page. What can she use to help her decide.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!