Write a code segment that uses a while loop and the random.randint and print functions to generate and print random integers between or including 1 and 6 until a 6 is rolled. The code segment must also count the number of times the number 3 was generated and display that value once at the very end of its execution.

Answers

Answer 1

In python:

import random

i = 0

while True:

   w = random.randint(1,6)

   if w == 6:

       break

   elif w == 3:

       i += 1

   print(w)

print(f"3 was generated {i} times")

I don't exactly know how you want the output but you should be able to modify my code according to your needs. I hope this helps!

   


Related Questions

1. P_OP_EW_RE
2.H_R_W_R_
3._ON_E_TI_IT_
4.P_OC_D_RE
5._O_TW_R_​

Answers

Answer:

poopaewr4vh23rbu2rfbu2rfu

Explanation:

Assume that sum is called with a parameter that satisfies the precondition and that it executes without error. How many times is the test expression i < bound in the for loop header evaluated

Answers

The number of times which the test expression i < bound in the for loop header can be evaluated assuming that a sum is called with a parameter that satisfies the precondition and that it executes without error is:

As many times as needed until the condition is met but which must be at least 1 time.

What is a Loop?

This refers to the repetition of an iteration until a preset condition is met and then it stops.

Hence, when a sum is called with a parameter in a line of code and a for loop is used with the test expression i< so that a certain condition can be met, then there would be multiple iterations until that condition is met, until it stops, which is the code execution without an error.

Read more about for loops here:

https://brainly.com/question/19344465

Monica is writing a paper, and it needs to contain a certain amount of words. What Word Online feature can she use?IndentingProofingWord amountWord count

Answers

Answer:

Its word count so she knows how much words she is writing

Explanation:

Write 200 words about Japan? ​

Answers

Japan, island country lying off the east coast of Asia. It consists of a great string of islands in a northeast-southwest arc that stretches for approximately 1,500 miles (2,400 km) through the western North Pacific Ocean. Nearly the entire land area is taken up by the country’s four main islands; from north to south these are Hokkaido (Hokkaidō), Honshu (Honshū), Shikoku, and Kyushu (Kyūshū). Honshu is the largest of the four, followed in size by Hokkaido, Kyushu, and Shikoku. In addition, there are numerous smaller islands, the major groups of which are the Ryukyu (Nansei) Islands (including the island of Okinawa) to the south and west of Kyushu and the Izu, Bonin (Ogasawara), and Volcano (Kazan) islands to the south and east of central Honshu. The national capital, Tokyo (Tōkyō), in east-central Honshu, is one of the world’s most populous cities.

Can someone come and see if I have answered this question correctly? Please ...
if i have a mistake or somewhere i can go deeper can you correct me? Thank you

Answers

Answer:

presentation or visualization

Presentation or visualization

Dan uses his personal laptop for writing the script for an upcoming high-budget, highly anticipated movie. To keep the script private, he decided not to connect his laptop to any network and updated his system with the latest virus definitions and security patches. Which of the following is Dan's laptop still vulnerable to?
a. ddos
b. dns poisoing
c. Cross-site scripting
d. Malcious USB

Answers

The security threat which Dan's laptop is still vulnerable to is: d. Malcious USB.

What is a laptop?

A laptop can be defined as a small, portable computer that is embedded with both a mousepad and keyboard, and it is usually light enough to be placed on an end user's lap while he or she is working.

In this scenario, Dan's laptop is still vulnerable to malicious universal serial bus (USB) even though he has decided not to connect his laptop to any network and made sure his laptop was updated with the latest virus definitions and security patches.

Read more on a laptop here: https://brainly.com/question/26021194

Kavin is an employed young man. He uses a laptop at hom has a dial-up Internet connection. His neighbour has a wireless high speed DSL Internet connection. Kavin uses his neighbour's wireless network while downloading big files. Is it legal? Why?

Answers

Answer:

It would be illegel because Kavin didn't ask his neighbour for the wi-fi password, so he was doing it by himself without perimisson.

Can anyone tell me what wrong with this code the instructions are "Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a random number is generated from 1 - 10 (inclusive) for the variables a and b. Also, instead of adding the two numbers together, the edited program should multiply them, and output the proper math problem and answer. Be sure to update every line of code to reflect the changes needed." My code runs but it hasa EOF. My code is

import random
random.seed(1,10)
a = random.randint (1,10)
b = random.randint (1,10)
print ("What is: " + str(a) + " X " + str(b) + "?")

ans = int(input("Your answer: "))

if (a * b == ans):
print ("Correct!")
else:
print ("Incorrect!")

Answers

Answer:

import random

a = random.randint(1,10)

b = random.randint(1,10)

answer = a * b

print(str(b)+" * "+str(a)+" = "+str(answer))

Explanation: So I am guessing you are on Edhesive Module 2.5 Intro to cs. Sorry it took so long but hopefully this works.

Digital citizenship focuses on _____. Select 3 options.

Answers

Respect, Education, and Protect.

Digital citizenship focuses on the following:

B. helping and leading others

C. targeting potential cyber criminals.

D. creating positive online experiences

What is digital citizenship?

The capacity to operate a keyboard, mouse, and other components of the digital system, as well as to interact with others online, is known as digital citizenship.

It also refers to learning how to behave with respect and decency on digital platforms, as well as how to communicate effectively online and build relationships.

The major goal of digital citizenship is to foster a pleasant environment by teaching others about cybercrime and bullying and raising their awareness of these issues.

Thus, the correct options are B. helping and leading others

C. targeting potential cyber criminals.

D. creating positive online experiences

To learn more about digital citizenship, refer to the link:

brainly.com/question/11542933

#SPJ5

The question is incomplete. You most probably the complete question is given below:

enforcing your rights on others

helping and leading others

targeting potential cybercriminals

creating positive online experiences

promoting the common good

You want to capture the state of a Hyper-V VM because you will be installing new software and you want to be able to get back to the state of the VM before the installation if something goes wrong. What option should you look for in Hyper-V?
a. Clone
b. Snapshot
c. Checkpoint
d. Export

Answers

Answer:

snapshot

Explanation:

a snapshot in virtual machines saves the state at a specific point in time. so this is the best answer

The option that one should look for in Hyper-V is snapshot. The correct option is b.

What is snapshot?

Data Snapshot captures and stores historical data from a report. It takes snapshots of data from a selected report on a regular basis and stores them in a table for historical report creation and analysis.

Snapshots are typically used for data protection, but they can also be used for application software testing and data mining.

When information is lost due to human error, a storage snapshot can be used for disaster recovery (DR).

A snapshot table contains the same raw, transactional data as its source in the transactional system, plus extra fields for tracking the snapshot date.

Snapshot tables are populated nightly with the rows of data in the source table that are considered effective (i.e., current) at the time of the extract.

Thus, the correct option is b.

For more details regarding snapshot, visit:

https://brainly.com/question/14181332

#SPJ2

WILL GIVE BRAINLIEST!!!!!!
People do look at transportation options when considering neighborhoods to which to move.

True

False

Answers

True is the answer youre looking for

The answer would be true

This motherboard already has 1GB of RAM installed in the DIMM1 slot. The customerwould like to upgrade to 4GB total memory, use the existing module if possible, and usedual-channel. What memory modules are needed? What capacities and how many ofeach capacity are required?

Answers

Answer:

The two phases to the context of this discussion are listed follows.

Explanation:

Solution 1: Delete 1 GB of current RAM as well as install another DIMM0 Chan A slot through one 2 GB of double-channel RAM. (thinkable unless the 2 GB RAM is provided by the motherboard in what seems like a DIMM0 Chan A slot)  Solution 2: whether there's an unused or blank slot, perhaps one 1 GB dual-channel Ram could be mounted in some other slot at around the same speed or frequency.  

It's quite safer to mount memory with appropriate frequencies across both situations.

The two phases are as follows:

Delete 1 GB of current RAM and install another DIMM0 Chan A slot through one 2 GB of double-channel RAM. (thinkable unless the 2 GB RAM is given by the motherboard in what seems like a DIMM0 Chan A slot)  .In the case when there's an unused or blank slot, so one 1 GB dual-channel Ram could be mounted in some other slot at around the similar speed or frequency.  

It's quite safe to mount memory having appropriate frequencies across both situations.

Learn more: brainly.com/question/17429689

[Python] Spot the errors in the code
x = int(input()
if x == 5
print(x is equal to 5)
else:
print("x is not equal to 5")

Answers

Answer:

There's no string double quotes in the print statement on line 3.The input statement on line 1 is wrong. It should actually be the following ⇒ print(input(Hello World))

All print statements must contain double quotes around a string. Otherwise, it will be interpreted as a number, and will lead to an error.

How does the DNS solve the problem of translating domain names like example.com into IP addresses?

How does DNS help the Internet scale?

Answers

Answer:

DNS translates domain names and hostnames into IP addresses through a basic lookup function.  When a user requests a domain name (as in the case of a browser lookup) the computer queries the local DNS server to find the matching IP address.  If the local DNS server does not contain the information in it's local database, it contacts the next higher DNS system or the root domain DNS servers (i.e. microsoft.com - if the local system does not know it, it will query the well-known DNS server for the .com domain - which will know where to get the information).  

DNS helps the users by not requiring them to remember the IP address of every system them want to connect with.  microsoft.com is much easier to remember than 40.82.167.220.  

DNS also helps the internet scale through the use of load balancing.  Multiple systems can comprise a single web site with the web pages stored on many different machines with multiple IP addresses.  When a user requests the microsoft.com website IP, they are given the primary IP of the load balancer sitting in front of the multiple computers.  The load balancer will then distribute the traffic to any of the systems that are hosting the web page that are not busy.  To the end user it look like they are connecting to a single machine - when in fact they are connecting to one of potentially hundreds of web servers with the same content.  As traffic grows on the internet more servers are necessary to handle the additional traffic.  DNS helps ensure the end user will connect to the proper web server regardless of the number of web server copies spun up in response to the additional traffic.  This allows the capacity to scale as necessary without interruption to the web site.  

Explanation:

DNS translates domain names into IP addresses so that the browsers can be able to load internet.

Through a lookup function, DNS solve the problem of translating domain names like example.com into IP addresses. It should be noted that when a user requests a domain name, the local DNS server will then find the matching IP address.

If the information isn't contained in the local database, then the information will be requested from the next higher DNS system. Through the Domain Name System (DNS), the human readable domain are translated to machine readable IP addresses.

Lastly, Domain Name System also helps in scaling the internet through the use of load balancing. The load balancer helps in the distribution of the traffic to the system hosting the web page.

Read more on:

https://brainly.com/question/23944954

can someone give me an window blur code in javascript like i mean full coding

Answers

Answer:

uh wha- what?!?!

Explanation:

no

find it urself

:P

jekqfjewil bored anyways

The option to send a publication in an e-mail is available in the _____ tab.

File
Home
View
Review

Answers

Answer:

File

Explanation:

Which features would work well for text entered into cells? Check all that apply.

thesaurus
spelling
autosum
average
find
replace

Answers

Answer: A,B,E,F, thesaurus, spelling, find, replace

Explanation:

took it on Edge.

Answer:

A B E F

Explanation:

Please post detailed answers to the following questions. Please use complete sentences.

Pick a piece of art, music, or architecture and explain how it reflects our era. What will historians in the future learn about us by studying the elements of our culture?

Answers

Answer:

Music

Detailed Paragraph:

            I believe that those who really love and care about music are the ones who grew up listening to songs that touched them and spoke to them in a profound way. I remember being in middle school when the music I listened to defined so much of my identity. Thus, in return, it's almost our unspoken job to create a sound that will be amplified to the next generation, impacting them and impacting our society in return. If we can gain a more comprehensive awareness of how our art form is making a difference around us, we will undoubtedly become better musicians – musicians with a purpose.

Wanda is taking photos using a lens that sees and records a very narrow view with a focal length longer than 60mm. When her friend asks what type of lens she is using for their photography outing,

Answers

Answer:

a telephoto lensExplanation: It's on Quizlet lol

And I got it correct on the test...

It provides an instant 2x optical zoom and has a focal length that is twice that of the primary lens. Additionally, it has a limited field of view, which causes distant things to resemble those that are nearby.

What role of telephoto lens in taking photos?

Simply put, a telephoto lens deceives the eye into thinking a topic is closer than it actually is. This may be the best option for photographers who are physically unable to go close to their subjects or who are concerned for their safety.

With a telephoto lens, the background elements appear larger and nearer to the foreground elements. The converse is true with wide-angle lenses, which make background elements appear smaller and farther away from the camera.

Therefore, a telephoto lens Wanda uses a lens longer than 60 mm in focal length to capture images with a very small field of view. When her friend inquires about the lens she will be using on their photographic excursion.

Learn more about telephoto lens here:

https://brainly.com/question/15599633

#SPJ2

In Fantasy Football, participants compete against one another by choosing certain players from different NFL teams that they think will do the best on any particular week. Top Fantasy Football players spend hours every day looking at statistics of the players and the teams. Spreadsheets and software tools are used to choose the best players. This process would be considered __________.
a. Data persistence
b. Data divide
c. Data collection
d. Data mining

Answers

This process that would be considered in the above scenario is Data mining.

What is data mining?

Data mining is known to be the act or method of knowing more about data via;

Leaning raw data.Finding patterns.Forming models.Testing those models.

Note that  It is a method that uses statistics, machine learning, and database systems and it will be good tool to be used in the scenario above.

Learn more about Data mining from

https://brainly.com/question/14776357

explain why a holiday on a cruise liner will be an ideal holiday​

Answers

Answer:

The great thing about a cruise holiday is that everyone in your party can please themselves yet still have a real holiday together. The kids can make new friends and take part in fun and educational activities during the day, while the adults unwind by the pool, learn a new skill or hit the casino.

explain with example how does delay marriage help for population management​

Answers

Answer:

Explanation:

The population in western richer countries is decreasing but the population in some poorer developing countries is increasing and normally in the poorer communities where education is minimal or not encouraged then men and women tend to get married young and have many children. Population management is not necessary because when men and women are educated and have good standard of living with a good social system of caring for the old then married couples will tend to have one or two kids or none at all. Population control was practised by PrC and it managed to alleviate 60% of the people out if poverty and reduced the population by implementing one child policy. Now China has more male than female creating social problems of finding a wife. In the West with good social system to care for the elderly more couples are not having children. In the west where living conditions and educational level are better the Caucasian race is not having that many children as the other races in developing countries. Education and financial independence of women will encourage married women to have one or two kids so that they can still pursue their career after marriage. With modern contraception you can delay having children until you are ready for them. The concept of delaying marriage to reduce population does not hold true. However the whites’ population is decreasing every year as compared to the other non white races. The reason is that in the poorer non white countries the population is higher because of subservient position of the women who have no say in birth control

One of the hardest threats that security professionals will have to address is that of the insider. True

Answers

Answer:

True

Explanation:

It is true because an insider can share information and distribute that information to outside agencies or groups.

The statement "one of the hardest threats that security professionals will have to address is that of the insider" is definitely true.

Why security check has been required?

The security check has been required by the companies because it allows individual access to classified national security information. It is also required in order to find out the character and fitness of an individual along with the verification of the information that is provided by the candidate.

The above statement reveals that the security of the employees is one of the hardest threats to the company. This is because any one of the insiders collects all sorts of information that are confidential to the organization and can share this information with an outsider in order to breach the privacy of the company.  

Therefore, the statement "one of the hardest threats that security professionals will have to address is that of the insider" is definitely true.

To learn more about Security professionals, refer to the link:

https://brainly.com/question/26260220

#SPJ5

Which of the following shows the assignment of a string to a variable ? Select 3 options.
A. answer = 23
B. answer = '23'
C. answer = input (" How old are you ? ") D. answer = (23)
E. answer = " 23 "​

Answers

The answer is going to be D
the answer is D answer = (23)

Select the correct technical term for each definition by using the drop-down menus.
A keyboard, mouse, and microphone are examples of
А
Mis an input device used to display video for video conferencing,
A
is an input device that responds to finger touch.
DONEN

Answers

The answer response are:

A keyboard, mouse, and microphone are examples of input devices.A display device is an output device used to display video for video conferencing.A touchpad is an input device that responds to finger touch.

What are the input devices?

Input devices are devices that allow users to input information into a computer, such as a keyboard, mouse, or microphone.

A display device is an output device that is used to present information in visual form, such as a computer screen or television screen. Display devices are used for video conferencing to show visual information to participants.

In all, a keyboard, mouse, and microphone are examples of input devices, a display device is used for output and video conferencing, and a touchpad is a type of input device that responds to finger touch.

Learn more about input devices from

https://brainly.com/question/12081537

#SPJ1

Write Python code for the following flowcharts

Answers

print("Enter a number")

number = input()

if number >= 1000: print("Bigger or equal to 1000")

else: print("Smaller than 1000")

Which keyboard shortcut can you use to access the go to feature, which will allow you to move quickly to another location in the document without having to search for it manually?.

Answers

The keyboard shortcut can you use to access the go to feature, which will allow you to move quickly to another location in the document  is  Ctrl+G or F5.

What is a keyboard shortcut?

Keyboard shortcuts are known to be keys or a set of combination of keys that a person can press on one's keyboard to carry out a specified tasks.

By using keyboard shortcuts , one is often often faster than using a mouse  and  to see the option you are looking for, you have to press Ctrl+G or F5.

Learn more about keyboard shortcut  from

https://brainly.com/question/12531147

Which word describes an important characteristic of good computer
algorithms?
O A. Numerical
B. Complex
C. Lengthy
D. Literal

Answers

I personally would pick Numerical but lengthy would work as well tbh both would work

The word that describes an important characteristic of good computer algorithms is Numerical. Thus, option A is correct.

What is computer algorithms?

The term computer algorithms has been defined as the a set of the instructions that would describes a step-by-step process for solving a specific problem. It has been often used in computer programming to automate repetitive tasks and streamline complex operations.

When an algorithm has integrated into a computer program, the process becomes automated, allowing the computer to perform the task repeatedly with minimal input from the user.

Therefore, the algorithm lacks the instructions for handling unexpected or the unanticipated results, the computer program may halt or encounter errors, potentially causing significant disruptions to the process.

Learn more about Algorithm on::

brainly.com/question/20533936

#SPJ7

Who makes "white box" computers?
O non-major companies
O Microsoft
Asus
Apple

Answers

Answer:

O NON- MAJOR COMPANIES.

(e) The vending machine stores the quantity of items available in a database table called ITEMS
The current contents of ITEMS is shown:
ItemCode
ItemName
Stock
A1
Crisps, bacon flavour
6
A2
Crisps, salted
2
B1
Chocolate bar
12
C1
Apple pieces
18
C2
Raisins
7
Complete the following SQL statement to display the item code for all items that have fewer than 10 in stock
SELECT
FROM

Answers

Answer:

a1,a2,62,

please mark brainliest

Explanation:

Other Questions
Click to review the online content. Then answer the question(s) below, using complete sentences. Scroll down to view additional questions. The History of Pizza Where was the "Margherita" pizza first made, and who was it made for? Pizza is not the only type of flat bread with toppings! According to the article, what other cultures have used flat bread as a food dish, and what kinds of toppings did they use? When did pizza come to America, and when did the first American pizzeria open? Which of the following are mathematical sentences? Check all that apply.O A. 9O B. 4+3 = 7OC. 7OD. 2 How has Mr. Rochester been freed by the fire?a. Mrs. Rochester died after having a fever and consumptionc. Mrs. Rochester's mother has taken her awayb. Mrs. Rochester came to her senses and has left Mr. Rochesterd. Mrs. Rochester killed herself by jumping off the 3rd story during the firePlease select the best answer from the choices providedABCD HELP ME PLS I NEED THIS LUV U GUYS please help if you can!! I will give you brainliest List TWO facts that show what fair discrimination is. Find the measure of < 5i will give brainly if u explain please One-fifth of an even number added to one-sixth of the next even number makes a total of 15. find the two numbers(Hint: let the number be x and x + 2.) 5 things about 17th amendment How much heat do you need to raise the temperature of 150 g of gasoline from 30 C to 15 C ?A.) 4.68 kJB.) 5.00 kJC.) 6.66 kJD.) 9.40 kJ Susie can buy apples from two stores: a supermarket that sells apples only in bundles of 4, and a convenience store that sells single, unbundled apples. If Susie wants to ensure that the total number of apples she buys is a multiple of 5, what is the minimum number of apples she must buy from the convenience store? What is the perimeter of the polygon Besides religion, what other advantages did Islam bring the people of Africa? 12.42 x 28.6 gbrbgrbfgbvfvffvfgfgfgfgfggfg 4 (x + 2) < 3(x + 4)i forgot some steps sorry i'm big dumb marlena is making her own beaded bracelets. each bracelet will have 10 beads. write a function to describe the number of beads she will use. find a reasonable domain and range for the function if she makes up to 7 bracelets. please help asappppppp Hello people ~Anemophily takes place by:(a) By Bird(b) By Bat(c) By Snail(d) By Wind Wyatt bought 5.73 ounces of chocolate. 0.01 ounces of it was milk chocolate and the rest was dark chocolate. How much dark chocolate did Wyatt buy?