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
sertanlavr [38]
2 years ago
8

Operators allow you to compare values then make decisions (Scratch Coding)

Computers and Technology
2 answers:
patriot [66]2 years ago
4 0

Explanation:

ok thnka

ivolga24 [154]2 years ago
4 0

Answer:

You make decisions every day, and each decision normally leads you to perform certain actions. You may think, for example, “If that computer  game is less than $15, I’ll buy it.” You then ask about the game’s price and decide whether or not you want to buy it. You can make decisions in Scratch, too. Using comparison operators, you can compare the values of two variables or expressions to determine whether one is greater than, less than, or equal to the other.

The three relational operators are:

greater than

less than

equal to

Greater than:  

The block checks if the first value is greater than the other value. If it is less, the block returns true; if not, it returns false. This block works with letters too, not just numbers. In Scratch, letters at the top of the alphabet (e.g. a, b, c) are worth less than letters at the end (e.g. x, y, z).

Less than:

The block checks if the first value is less than the second value. If it is less, the block returns true; if not, it returns false. This block works with letters too, as well as numbers. In Scratch, letters at the top of the alphabet (e.g. a, b, c) are worth less than letters at the end (e.g. x, y, z).

Equal to:

The block checks if the first value is equal to the other value. If the values are equal, the block returns true; if not, false.

So yeah <3

You might be interested in
Alex’s family members live in different parts of the world. They would like to discuss the wedding plans of one of their distant
goldenfox [79]
The answer would be b
8 0
3 years ago
Read 2 more answers
What is Selection statement?​
Sati [7]

Answer:

Selection statements (sometimes called conditional statements) can be defined as code (statements) that is executed only when a certain condition is satisfied.Selection is a powerful tool to control when and which code statements will run.

3 0
2 years ago
Read 2 more answers
Please help me with Excel!!! A lot of points!
yaroslaw [1]

Answer:

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE))/12

Explanation:

Adds all of the Monthly Expenses : SUM(PUT RANGE OF MOTHLY EXPENSES HERE)

Multiplies the result by 12: *12

Then adds all of the Yearly Expenses to the product of Steps 1 and 2 : SUM(PUT RANGE OF YEARLY EXPENSES HERE)

Divides this new sum by 12: /12

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE)/12)

6 0
3 years ago
Write a program that simulates flipping a coin repeatedly and continues until three consecutive heads. are tossed. At that point
quester [9]

Answer and Explanation:

#include <iostream>

#include <string>

#include <time.h>

#include <vector>

using namespace std;

//Takes user info

int user_info(string *name,char *gender){

   char G;

   cout<<"What is your name?: ";

   getline(cin, *name);

   cout<<"What is your gender(m/f):";

   cin>>G;

   cout<<endl;

   *gender = tolower(G);

   return 0;

}

//Toss coin(part 2)

bool coin_toss(double seed){

   double r;

   r = (double)seed/(double)RAND_MAX;

   //cout<<r;

   if (r<0.5) return true;

   return false;

}

//check results

float toss_result(vector<char> v,int *h){

   int num_heads=0;

   int num_toss = v.size();

   *h = 0;

   for(int i=0;i<num_toss;i++){

       if(v[i]=='h'){num_heads++;(*h)++;}

   }

   return (float)num_heads/(float)num_toss;

}

void show_result(int total_num,int head_num,float ratio){

   cout<<"it took you "<<total_num<<" tosses to get 3 heads in a row"<<endl;

   cout<<"on average you flipped heads "<<(ratio*100)<<"% of the time"<<endl;

}

int main()

{

   string name;

   char gender;

   string K; //Mr or Mrs

 

   cout<<"Welcome to coin toss! Get 3 heads in row to win!"<<endl;

 

   //part 1

   user_info(&name,&gender);

 

   if(gender == 'f') K = "Mrs.";

   else K = "Mr.";

 

   cout<<"Try to get 3 heads in a row. Good luck "<<K<<name<<"!"<<endl;

   char dummy = getchar();

 

   //part 2

   int num_toss;

   vector<char> toss_results;//store toss results

   bool result;//result of toss

   srand(time(0));

   while(true){

       //cout<<rand()<<endl;

       result = coin_toss(rand());

       cout<<"Press <enter> to flip"<<endl;

       while (1)

       {

           if ('\n' == getchar())

           break;

       }

     

 

     

       if(result) {toss_results.push_back('h');cout<<"HEAD"<<endl;}

       else {toss_results.push_back('t');cout<<"TAIL"<<endl;}

     

       num_toss = toss_results.size();

     

       if(num_toss>=3){

           if ((toss_results[num_toss-1] == 'h')&&(toss_results[num_toss-2] == 'h')&&(toss_results[num_toss-3] == 'h')){

               break;

           }

       }

   }

 

   //part 3

   float ratio_head;

   int num_of_heads;

   ratio_head = toss_result(toss_results,&num_of_heads);

 

   //part 4

 

   show_result(toss_results.size(),num_of_heads,ratio_head);

 

   return 0;

}

8 0
3 years ago
With landscape photography, which depth of field do you normally want? A) Small B)Small to Medium C)Large D)With landscapes it d
RideAnS [48]
I am not 100% on this but i think you would want a Large depth of field. 
3 0
3 years ago
Read 2 more answers
Other questions:
  • In Java Write a program that prompts the user for a name (any String value would work for testing), and print a hello message to
    15·1 answer
  • Suppose your SOHO network connects to the Internet using cable modem. When you open your browser and try to access a web site, y
    8·1 answer
  • What are some objects in your home that demonstrate electrical energy to radiant energy to thermal energy
    10·2 answers
  • The __________ tag is used to create a forced line break without starting a new paragraph.
    13·1 answer
  • A case competitions database:You work for a firm that has decided to sponsor case competitions between teams of college business
    12·1 answer
  • Windows stores information from the Credential Manager application in secure folders called
    5·1 answer
  • The merge sort algorithm____________.A. Can be used only on vectors of even length.B. Works by reducing vectors down to the base
    9·1 answer
  • Avi does not want to save his internet browsing details on his computer. What should he do?
    11·1 answer
  • List 10 examples of computer ethics<br>(please give even 1 if you can, I need it urgently) ​
    10·1 answer
  • Who plays warzone im a roze sweat and ill try to carry with loadout
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!