How many times is the coin tossed?

var heads = 0;
var tails = 0;
var rolls = 100;
for(var i = 0; i < rolls; i++){
if(randomNumber(0,1) == 0){
heads++
} else {
tails++
}
}

Answers

Answer 1

Answer:

100 times.

Explanation:

The code will loop until i is equal to or greater than roles. I starts at zero and increases by one after each toss.

Answer 2
The answer is what the other guy said

Related Questions

Which statement about technology before the invention of the printing press is true?

Answers

Answer: See explanation

Explanation:

You didn't give the options to the question and I searched and couldn't find the particular question.

Here, are some of the things about technology before the invention of the printing press.

1. Before printing press, monks copied books such as bibles as they'll copy calligraphy and illustrations in order for them to spread the messages in the Bible across to people.

2. Before printing press, oral communication was the way that people communicated with each other.

3. Drawings and writings were done by hand before printing press.

4. Before the invention of printing press, in order to transcribe books, different materials that were used include wax, parchment, clay and papyrus.

import java.util.Scanner;

public class PigLatin {
public static void main(String args[]) {
Scanner console =new Scanner(System.in);
System.out.println("Please enter a word");
String phrase=console.nextLine();

System.out.println(eachWord(phrase));
}

public static String eachWord(String phrase) {
String help[]=phrase.split(" ");

for(int i=0; i
if (help[i].charAt(0) == 'a'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'e'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'i'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'o'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'u'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'A'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'E'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'I'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'O'){
return help[i] + "-ay";
}
if (help[i].charAt(0) == 'U'){
return help[i] + "-ay";
}
else {
return help[i].substring(1)+"-"+help[i].charAt(0)+"ay";
}

}
return "aoujbfgaiubsgasdfasd";
}

I need help with this Pig Latin Program. I want to split the string so each word can run through the method eachWord. I don't know how to revamp this!

Answers

Answer:b

Explanation:

I took quiz

Answer:

uuuuuuuuuuhhm

Explanation:

CODE!

What is used to give credit to the source from which information is obtained?
a citation
linkage
plagiarism
a format

Answers

a citation gives credit to the source

Answer:

a citation

Explanation:

Taylor needs to remove the text to the left of his cursor. Which of the following keys should he press?

Answers

Answer:

bacspace not delete

Explanation:

delete erases on the right not left

Backspace he should press to remove the text to the left of his cursor.

What is cursor?

A cursor is an indicator used in computer user interfaces to show the current position for user interaction on a computer monitor or other display device that responds to input from a text input or pointing device. Because of its usage resemblance to a pointing stick, the mouse cursor is also known as a pointer. Cursor is a Latin word that means "runner." The transparent slide engraved with a hairline that is used to mark a point on a slide rule is known as a cursor. By example, the word was later transferred to computers. On November 14, 1963, while attending a computer graphics conference in Reno, Nevada, Douglas Engelbart of the Augmentation Research Center (ARC) expressed his desire to pursue his goal of developing both software and hardware computer technology to "augment" human intelligence by pondering how and where to adapt the underlying principles of the planimeter to inputting X- and Y-coordinate data.

To learn more about cursor
https://brainly.com/question/12406758

#SPJ2

Write the code in python to ask the user to input two integers. Your program will then print the greatest common divisor of the two integers. Look at the math module for a function that will help you find the greatest common divisor.

Answers

import math

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))

print(math.gcd(num1, num2))

The gcd() - greatest common divisor function, which is part of the math module works perfectly in this situation.

Considering there are 2 dictionaries, one with the name of the person and the stock name and number of stocks they have and the other dictionary has the stock name and it’s today’s market value -

Ex: a = { “Joe” :{“AAPL”:5, “AMZN”:2}, ”Bill” :{“AAPL”:2, “AMZN” :5 }}

B = {“AAPL” : 227, “AMZN” :1721 , “NFLX” : 267 , “TSLA” : 244, “FB” : 179 }



Write a Python program to find the amount of money each person makes by selling all of their stock today, and who will get the most value

Answers

a = {"Joe": {"AAPL": 5, "AMZN": 2}, "Bill": {"AAPL": 2, "AMZN": 5}}

B = {"AAPL": 227, "AMZN": 1721, "NFLX": 267, "TSLA": 244, "FB": 179}

total = 0

largest = 0

for x in a:

   for w in a[x]:

       total += a[x][w] * B[w]

   a[x] = total

   if total > largest:

       largest = total

   print("{} will have ${}".format(x, total))

for x in a:

   if a[x] == largest:

       print("{} will get the most value".format(x))

I hope this helps!

//TO-DO: Fill in the Authors Name Here//TO-DO: Fill in the current date here//CS1428 Lab//Lab 10//Description: this program will find letter grades from 5 number grades#include using namespace std;double getAverage(double g[], const int SIZE){ double total = 0; for(int i = 0; i < SIZE; i++) { total += g[i]; } return total / SIZE;}void getGrades(double g[], const int SIZE){ cout << "Please enter 5 grades:" << endl; for(int i = 0; i < SIZE; i++) { cin >> g[i]; }}// TODO: Complete function definitionsint main(){ const int SIZE = 5; double grades[SIZE], average; int numberOfAs = 0, numberOfBs = 0, numberOfCs = 0, numberOfDs = 0, numberOfFs = 0; //TODO: Add function calls return 0;}

Answers

Answer:

countLetterGrades:

void countLetterGrades(double grades[], const int SIZE, int &numberOfAs,int &numberOfBs,int &numberOfCs,int &numberOfDs,int &numberOfFs) {

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

if(grades[i]>85){numberOfAs++;}

else if(grades[i]>75){numberOfBs++;}

else if(grades[i]>65){numberOfCs++;}

else if(grades[i]>55){numberOfDs++;}

else{ numberOfFs++;}

}

}

printData:

void printData(double average, int numberOfAs,int numberOfBs,int numberOfCs,int numberOfDs,int numberOfFs)

{

cout<<"Average: "<<average<<endl;

cout<<"Number of A's: "<<numberOfAs<<endl;

cout<<"Number of B's: "<<numberOfBs<<endl;

cout<<"Number of C's: "<<numberOfCs<<endl;

cout<<"Number of D's: "<<numberOfDs<<endl;

cout<<"Number of F's: "<<numberOfFs<<endl;  

}

Explanation:

Your question is poorly formatted. (See attachment for proper presentation of question)

------------------------------------------------------------------------------------------------------------

The first step is to go to the main function and replace

//TODO: Add function calls

with the following 4 lines of code:

getGrades(grades,SIZE);

average = getAverage(grades,SIZE);

countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

------------------------------------------------------------------------------------------------------------

1. getGrades(grades,SIZE);

This calls the getGrade functions; The getGrade function is where the user inputs 5 grades for a student

2. average = getAverage(grades,SIZE);

Next, is to get the average of the input grades. This is done using the above and the average is stored in variable average

3. countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

Next, is to get letter grade of each number grade. This is done using countLetterGrades function.

4. printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

The above 3 functions populate data for average, numberofAs to numberofFs; This values are passed to printData function to to display program output.

------------------------------------------------------------------------------------------------------------

Next complete countLetterGrades and printData functions as seen in the answer section.

For clarity, see the attached cpp file for line by line explanation of the complete code

What affect did the Scopes trial have on the school curriculum in Tennessee?
It changed the curriculum to include creationism in science classes.
It did not change the curriculum because Bryan died shortly after the trial.
It changed the curriculum to include evolution in science classes.
It did not change the curriculum because Scopes lost the case.

Answers

D)It did not change the curriculum because Scopes lost the case.

The effect that Scopes trial had on the school curriculum in Tennessee is that

It did not change the curriculum because Scopes lost the case.

The Scopes trial

The scopes trial was a trial that involved a high school teacher called Scopes and the government of the United States.

This trial took place at the time where the US was subject to very serious Christian beliefs.

The reason for the trials was that Scopes had taught evolution in the classroom.

Read more on the Scopes trial here:

https://brainly.com/question/874883

The most commonly used auxiliary storage device(s) is/ are _____.
a.
floppies and tapes
b.
a filing cabinet
c.
hard disks and floppies
d.
tapes and hard disks

Answers

Answer: A

Explanation:

What will you see on the next line? >>> int(6.5)

Answers

Answer:

6

Explanation:

The int functions founds down to the nearest whole number, which in this case would be 6.

Answer:

6

Explanation:

The amount of data that can be stored on a disk depends in part on_____.
a.
the number of tracks on the disk
b.
the thickness of the magnetic coating
c.
none of the above
d.
the rotational speed of the disk

Answers

to what it seems like, it’s d

Use the factorial operation to evaluate 4!.

24

1

4

10

Answers

Answer:

4! = 4 x 3 x 2 x 1

= 24

Answer is 24.

Answer:

24

Explanation:

EDGE 2022

Jack is using a document that has multiple references to his company as Company ABC, LLC. He would like to change these values to CompanyABC, LLC. What is the easiest way to do this?

Answers

Answer:

C. Press CTRL to access the Find and Replace dialog box.

Explanation:

yuh yuhuhu edge 2020 gang gang

what is the difference between MAC address and IP address?
Thanks in advance

Answers

Answer:

MAC Address ensure that physical address of the computer is unique.

IP Address is a logical address of the computer and is used to uniquely locate computer connected via a network.

anyone 13 i a boy 13 pan

Answers

Answer:

RATED- SUS

Explanation:

Please I need 26 examples of hybrid search engines?

Answers

Answer:

Google, Bing, Yahoo, Yandex, Duck Duck Go!, Baidu, Ask, Naver, Alta Vista, Hotbot, AOL, AllTheWeb, Exite, Mahalo.

4.9 Code Practice: Question 2
Instructions
Write code using the range function to add up the series 20, 30, 40, ... 90 and print the resulting sum each step along the way.

Expected Output
20
50
90
140
200
270
350
440

Answers

total = 0

for x in range(20,91,10):

   total += x

   print(total)

I hope this helps!

Answer:

sum = 0

for i in range (20, 91, 10):

  sum += i

  print(sum)

write some positive and negative impacts of computer in our daily life​

Answers

Positive impacts are
1. Communicating with people
2. Daily update of what going on in the world
3. learn new things
Negative impacts are
1. Viruses
2. Private information shared
3. Less face to face conversations

If you draw strength from video games, how?

Answers

Answer:

I really dont know

Explanation:

Thank u for the pts tho < :)

I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRIST AND CORRECT
How are blogs and wikis alike?


accessible 24/7

telecommunications technology

collaboration tool

available online

used for online dialog

increase business productivity

Answers

Answer:

accessible 24/7

available online

increase business productivity

telecommunications technology

Blogs and wikis alike because they are:

Accessible 24/7.Available online.Increase business productivity.Telecommunications technology.

What are blogs?

A blog is known to be a short word for  “weblog”. This is known to be a kind of an online journal that is also said to be an informational website where one can get Infor on different subject.

Conclusively, Note that Blogs and wikis alike because they are Accessible 24/7 and one can get any information they want from it to increase  business productivity.

Learn more about Blogs from

https://brainly.com/question/3653791

#SPJ2

Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program needs to output the phrase Greater than 45.6.

Answers

Here is the solution. Let me know if you have any question

Erin’s classmate said that the program that they were working on is not running properly because the classmate accidentally put in commas where semi-colons should be. What kinds of errors does Erin need to fix?
logic errors
database errors
debugging errors
syntax errors

Answers

Answer:

A simple syntax error :)

"A character or string incorrectly placed in a command or instruction that causes a failure in execution."

Good luck! Hope this helped! :D

The kinds of errors does Erin need to fix is a simple syntax error.

What is syntax error?

Syntax is a character or string when incorrectly placed in a command or instruction results in failure while executing.

Erin’s classmate said that the program that they were working on is not running properly because the classmate accidentally put in commas where semi-colons should be.

The correct way to remove syntax error is putting colon and semicolon on the right place.

Learn more about syntax error.

https://brainly.com/question/18271225

#SPJ2

why are media conductors needed in computer network?​

Answers

Answer:

Transmission media connectors attach directly to the medium itself and serve as the physical interface between cabling and network nodes.

Explanation:

Answer:

masamstha 31 is correct hope it's help you have a good day

Which of the following is an example of a database?
A. the names and ages of children
B. the title of a book
C. a word that rhymes with bat
D. the name of the most recent U. S. president

Answers

A. The names and ages of children

Answer:

the names and ages of children

what is the meaning of .com in computer​

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The terms ".com" is the most common term that you see at the end of the domain name. This term is most widely used in computers and in websites. The dot com ".com" is a suffix and most common suffix in website addresses.

Furthermore, the term ".com" is short for a commercial for many educational, personal, profit, and non-profit websites. The reason behind using .com as a suffix in a website name is that it is most common and recognizable.

You can buy a website domain with dot com ".com" suffix from many website hosting companies. The companies that using dot com in their website name they are mostly doing business on the internet.

The resistance in a particular kind of circuit is found using this formula: R1(R2)R1+R2.


Assuming all the variables are non-zero, which line of code will find the value of the resistance?


resistance = (R1 * R2) / (R1 + R2)

resistance = R1(R2) / R1 + R2

resistance = R1(R2) / (R1 + R2)

resistance = R1(R2) / (R1 + R2)

Answers

Answer:

resistance = (R1 * R2) / (R1 + R2)

Explanation:

PYTHON doesn't recognize multiplication like this example >> 3(4)

This is why PYTHON uses this symbol (*)


Help me please I need the correct answe

Answers

Pretty much, yeah.

if it's wrong just pick false.

_______are a set of track sectors, ranging from 2 to 32 or more, depending on the formatting scheme in use.

a.
Cylinders
b.
Track sectors
c.
Tracks
d.
Cluste

Answers

Answer:

Clusters

if thats incorrect than Cylinders

Question # 1
Multiple Select
You already now about some collections. Which of the following is a type of collection in Python? Select 2 options.

group

dataset

ordered set

list

deque

Answers

Answer:dataset

Explanation:

data set because it is kida a set

Answer:

A list, and a deque.

Explanation:

Why am i right? Because i am.. TRUST ME ITS RIGHT YW EVERYONE! :3

What does a file association specify?
A) the software needed to open a file

B) the file’s author

C) the file’s directory path

D) a list of related files

Answers

Answer:

A) the software needed to open a file

Explanation:

The software needed to open a file is specified by file association. Option A is correct.

What is the file association?

A file association in computing links a file with an application that may open it. A file association more frequently links a group of files to the appropriate program. The file association identifies the program required to open a file.

The practice of capitalizing the first letter of each word in a name. Specifies the program that the Windows operating system should use to open the file. Windows' method of associating a program name extension with a file name.

Under this, Extensions are crucial since they inform the computer about the file's icon and the program that may open it. Like, a file with the extension “doc” indicates to your computer that it is a Microsoft Word file.

Therefore, option A is correct.

Learn more about the file association, refer to:

https://brainly.com/question/14287892

#SPJ2

Other Questions
a mountain top becomes smoother over time due to Given the expressions: 5x+2(x-4) and 7x-8 first prove that they are both equivalent and explain why your method proves this. Helpp pls I tired to solve it out but I cant get it I need help with this please. I already did this problem but I think I made a mistake can you please look it over? (GRADE7MATH) Can somebody plz answer all the questions correctly and show ur answer..thanks!! (Only if u done this before) WILL MARK BRAINLIEST) :D Which statement is not true for a magnetic field?O A. A magnetic field occurs near a wire that has no current.OB. A magnetic field is produced by a magnet with two poles.O c. A magnetic field loops from the north pole to the south pole.O D. A magnetic field occurs near a current-carrying wire. Humans have always developed new inventions and ways of doing things. Sometimes, innovations have led to a transformation of human society. Match the innovations below to the societal system they helped create by selecting the correct answers from the drop-downs. Group of answer choices domestication of animals [ Choose ] development of metal armor [ Choose ] development of grain distribtution [ Choose ] planting of seeds [ Choose ] creation of laws and rules [ Choose ] creation of a bureaucracy [ Choose ] Simplify 10cm:30cmSimplify 2cm:1m Does the table represent a proportional relationship? What's the slope of this line How do I solve problems like5 + 2y = 1 What minimum level of education do drug and alcohol counselors usually have?bachelors degreeassociates degreemasters degreeDoctorate degree Natural _______is a mechanism for the evolution of a population to become better adapted for survival in a specific environment. 7 types of motion you experience through the day. Compare physical change and chemical change in terms of the arrangement of the particles and the changes in number of atoms or types of atoms? Shawna is saving money to buy a new laptop. She starts her savings with $64. Each week, she adds another $17 to her savings. Graph the relationship that models the amount of money Shawna is saving. If her laptop costs $589, after how many weeks will she be able to afford the laptop? Both the Civil Rights Act and the Voting Rights Actallowed civil rights activists to protest peacefullymeant the end of discrimination in the countrydiscouraged state governments from enforcing the laws.gave the federal government tools to enforce the laws. Help please I will give BrAnLiEsT!!! Read the following excerpt from "Woman Who HelpedHide Anne Frank Dies at 100" by Teri Schultz.Ms. MIEP GIES: I, myself, I'm just a very commonperson. I simply had no choice. I could foresee many,many sleepless nights and a life filled with regret if Iwould have refused to help the Franks. And this was notthe kind of life I was looking for at all.SCHULTZ: Gies explained another motivation foremphasizing her modesty. She said if people are allowedto think it takes remarkable qualities to act boldly onbehalf of others, few will attempt it.Ms. GIES: People should never think that you have to bea very special person to help those who need you.What is the purpose of Miep Gies in this excerpt?O to tell people about all of her heroic actions duringWorld War IIto preserve the important legacy of Anne Frank andher diaryto show people that she has always remained amodest personOto persuade the audience that ordinary people can doremarkable things Using a maximum allowable shear stress of 70 MPa, find the shaft diameter needed to transmit 40 kW when (a) The shaft speed is 2500 rev/min. (b) The shaft speed is 250 rev/min Read the problems and and write the word that indicates an equation or inequality and decide whether an equation or inequality is indicated Brett has a $30 online gift certificate. He plans to buy as many books as he can. The cost of each book is $4. There is also a single shipping charge of $2. How many books can he afford without spending more than his gift certificate amount? Word/phrase?_________ Equation/Inequality_______