import random
num_rolls = 0
while True:
r1 = random.randint(1, 6)
r2 = random.randint(1, 6)
print("Rolled: " + str(r1) + "," + str(r2))
num_rolls += 1
if r1 == r2 == 1:
break
print("It took you "+str(num_rolls)+" rolls")
I added the working code. You don't appear to be adding to num_rolls at all. I wrote my code in python 3.8. I hope this helps.
The program uses loops and conditional statements.
Loops perform repetitive operations, while conditional statements are statements used to make decisions
The program in Python where comments are used to explain each line is as follows:
#This imports the random module
import random
#This initializes the number of rolls to 0
num_rolls = 0
#The following loop is repeated until both rolls are 1
while True:
#This simulates roll 1
roll_one = random.randint(1,6)
#This simulates roll 2
roll_two = random.randint(1,6)
#This prints the outcome of each roll
print ("Rolled: " +str(roll_one) +"," + str(roll_two))
#This counts the number of rolls
num_rolls+=1
#When both rolls are the 1
if (roll_one == 1 and roll_two == 1):
#This exits the loop
break
#This prints the number of rolls
print ("it took you " + str(num_rolls) + " rolls")
Read more about similar programs at:
https://brainly.com/question/14912735
what is the best way of farming exotics in destiny?
Answer:
the best way to farm exotics in destiny is talking to xur and playing nightfall all day but play at least on hero or legend difficulty to get exotics faster because it is very common to get them on those difficulties and more higher difficulties.
Explanation:
Hillary’s family is thinking of relocating to a different city to save money. They set up a budget comparing the cost of living in four cities.
Oakland
Phoenix
Santa Fe
San Diego
Item
Cost
Cost
Cost
Cost
Housing
$565
$465
$505
$1200
Food
$545
$495
$475
$655
Health Care
$245
$215
$200
$495
Taxes
$450
$415
$385
$625
Other Necessities
$350
$305
$295
$495
Monthly Total
$2155
$1895
$1860
$3470
Based on cost of living alone, which city should they choose to live in?
Answer: Oakland, and also a city they feel is the safest + best for there family
Explanation:
And office now has a total of 35 employees 11 were added last year the year prior there was a 500% increase in staff how many staff members were in the office before the increase
There were 5 staff members in the office before the increase.
To find the number of staff members in the office before the increase, we can work backward from the given information.
Let's start with the current total of 35 employees. It is stated that 11 employees were added last year.
Therefore, if we subtract 11 from the current total, we can determine the number of employees before the addition: 35 - 11 = 24.
Moving on to the information about the year prior, it states that there was a 500% increase in staff.
To calculate this, we need to find the original number of employees and then determine what 500% of that number is.
Let's assume the original number of employees before the increase was x.
If we had a 500% increase, it means the number of employees multiplied by 5. So, we can write the equation:
5 * x = 24
Dividing both sides of the equation by 5, we find:
x = 24 / 5 = 4.8
However, the number of employees cannot be a fraction or a decimal, so we round it to the nearest whole number.
Thus, before the increase, there were 5 employees in the office.
For more questions on staff members
https://brainly.com/question/30298095
#SPJ8
Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape (How many of the selected shape user wants to create). The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.
Answer:
Explanation:
The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.
Explain why the scenario below fails to meet the definition of competent communication with a client about
website design.
Situation: Jim, an owner of a small business, wants a website to expand his business.
Web designer: "Jim, you have come to the right place. Let me design a website, and then you can tell me if it meets
your needs."
Answer:
The scenario fails to meet the definition of competent communication with a client about website design because the web designer does not engage in a proper dialogue with Jim, the client. Competent communication involves actively listening to the client, asking questions to understand their needs, and working collaboratively to develop a website that meets those needs.
In this scenario, the web designer is assuming that they know what Jim wants without seeking his input. Instead of having a conversation with Jim to identify his business goals, target audience, and design preferences, the web designer is proposing to create a website on their own and then ask Jim if it meets his needs.
This approach does not take into account Jim's unique needs and preferences, and it could result in a website that does not align with his business objectives. Competent communication requires a partnership between the web designer and the client, where both parties work together to create a website that meets the client's specific needs and goals.
Explanation:
Please help me understand what I'm doing wrong in my python code, its returning a [] in the written file.
# You work at a low latency trading firm and are asked to deliver the order book data provided in order_book_data.txt to a superior
# The problem is that the data isn't formatted correctly. Please complete the following steps to apropriately format the data
# Notice, the first column is a ticker, the second column is a date, the third column is a Bid, the fourth column is an Ask, and the fifth column is a currency type
# 1. Open order_book_data.txt
# 2. Remove the order book lines. i.e. ***** Order Book: ###### *****
# 3. Get rid empty lines
# 4. Get rid of spaces
# 5. Notice that there are two currencies in the order book; USD and YEN. Please convert both the Bid and Ask price to USD (if not already)
# The Bid and Ask are the 3rd and 4th column, respectively
# 6. Create a header line Ticker, Date, Bid, Ask
# 7. Save the header line and propely formatted lines to a comma seperated value file called mktDataFormat.csv
Answer:
There are several issues with the code that could be causing it to return an empty file.
Indentation errors: Python relies on indentation to indicate blocks of code, so it's important to make sure that the code is indented correctly. In your code, the if statement and columnA = float(columnA) line are not indented properly.Missing append statement: After converting the Bid and Ask prices to USD, the code is not actually adding them to the data list.Writing the wrong variable: In the last line of the code, you are writing the entire data list as a string, instead of iterating through the list and writing each element as a string.Explanation:
file = open("order_book_data.txt", "r")
data = []
lines = file.readlines()
for line in lines:
if line.strip() == '':
continue
if ("***" in line):
continue
column = line.strip().split(",")
columnA = float(column[2])
columnB = float(column[3])
if column[4] == "YEN":
columnA = columnA * 0.0075
columnB = columnB * 0.0075
column[2] = str(columnA)
column[3] = str(columnB)
data.append(",".join(column))
header = "Ticker,Date,Bid,Ask\n"
file.close()
file2 = open("mktlinesFormat.csv", "w")
file2.write(header)
for line in data:
file2.write(line + "\n")
file2.close()
In this code, i use continue statements to skip over the order book lines and empty lines. then i split each line into a list of columns, convert the Bid and Ask prices to USD if necessary, and join the columns back into a comma-separated string. then append the formatted string to the data list.
After processing all the lines, i write the header line and each formatted line to a new file, one line at a time. Note that add a newline character \n to the end of each line to ensure that each line is written on a separate line in the file.
2
3
oooq
ABCD
5
10
Frankie is in charge of writing a script for a television show, along with six other writers. The script must be
finished by the end of the week. Frankie's co-workers all bring slightly different strengths to the table, but all are at
least competent. Frankie wants to write the best possible script in the generous amount of time he has to work
with. In this example, which style of leadership would be most effective for Frankie's goals?
a. Authoritarian
b. Coaching
c. Democratic
d. Delegative
Please select the best answer from the choices provided
Mark this and return
Save and Exit
01:20:28
Next
Submit
Based on the information provided in the question, it seems that a democratic leadership style would be most effective for Frankie’s goals. In a democratic leadership style, the leader involves team members in the decision-making process and encourages collaboration and open communication. This approach can help to ensure that everyone’s strengths are utilized and that the best possible script is written within the given time frame.
describe a topic or idea you find so fascinating that you lose all track of time while engaging with it. reddit
Reddit is an online platform that is highly addictive, where users can discuss and share ideas on almost any topic imaginable. It’s a world full of interesting conversations, which is why I find it so fascinating.
What is reddit?
Reddit is an online forum and social media platform where users can share news, images, and links, as well as discuss and upvote content posted by others. It is organized into topic-specific categories called "subreddits," and users can join subreddits of interest and contribute to discussions. Reddit is known as the "front page of the internet," as it is a popular source of news and entertainment. It provides an environment for users to interact, exchange ideas, and discuss topics of all varieties. Reddit also has a reputation for its sense of community and for being a safe space for open and honest discussion.
To learn more about reddit
https://brainly.com/question/14555610
#SPJ4
Write a procedure ConvertToBinary that takes an input as a number from 0 to 16 (including 0 but not 16) and converts it to a binary number. The binary number should be returned as a list.
Sure, here's an example of a Python function that converts a decimal number to binary and returns the result as a list:
def ConvertToBinary(decimal):
binary = []
while decimal > 0:
remainder = decimal % 2
binary.append(remainder)
decimal = decimal // 2
return binary[::-1]
The function takes in an input decimal which is a number between 0 and 16 (not including 16) and uses a while loop to repeatedly divide the decimal number by 2 and take the remainder. The remainders are then appended to a list binary. Since the remainders are appended to the list in reverse order, the result is reversed by slicing the list [-1::-1] to give the proper order.
You can also add a check to make sure that the input is within the required range:
def ConvertToBinary(decimal):
if decimal < 0 or decimal >= 16:
return None
binary = []
while decimal > 0:
remainder = decimal % 2
binary.append(remainder)
decimal = decimal // 2
return binary[::-1]
this way you can make sure that the input provided is within the allowed range.
how i want to be good in coding for subject c programming? anyone has a suggestion?
Answer:
Get more details about Standard Library Functions in C.
Use logical variable names to avoid any confusion.
Don't forget to check a complete guide for Variables in C.
Explore how Escape Sequence in C make your coding better.
Write a program that asks the user for the name of a file. The program should display only the first five lines of the file's contenents if the file contains less than five lines, it should display the files's entire contenents
To write a program that asks the user for the name of a file, we will use the readline() method of our file object, and using a for loop, we'll repeat the readline() five times.
The structure of the program and it's programming:
We will use readline() method of our file object( here it has been taken as file_obj).
Using a for loop we'll repeat the readline() five times.
If the file has less than five lines and we try to keep reading after the read position has gotten to the last character in the file, the readline() function will just return the empty string " ".
So nothing will be displayed. We need set end=' ' in our print() function to ensure that we don't get a bunch of extra new lines.
Don't forget to close the file after you're done with it.
# Getting file name from the user filename = input('Enter the filename :')
# Opening the file in read mode file_obj = open(filename, 'r');
# Reading and displaying the file's first five lines for i in range(5): print(file_obj.readline(), end = '')
# Reads a single line at a time and displays it # Closing the file file_obj.close()
To know more about programming, visit: https://brainly.com/question/16936315
#SPJ1
type of software designed for users to customise programs is?
Select the correct answer from each drop-down menu.
What are the different ways in which you can use a Smart Object for image manipulation?
You can_____
a Smart Object without editing your image pixels directly. Alternately, you can_____
the Smart Object as a separate image even after placing it in a Photoshop image.
Reset Next
1.
A. Remove
B. Scale
C. Darken
2.
A. Lighten
B. Edit
C. Compress
Answer: A and C
Explanation:I did it before
How is a struck-by rolling object defined?
Answer:
Struck by rolling object is commonly defined as Struck-By Rolling Object Hazard because it was caused by rolling objects or any objects that moves in circular motion that could cause an injury or accident.
Explanation:
JAVA PROJECT USING ( WHILE LOOP )
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving left 1 position.
Bubble 1 and 2 are moving left 1 position.
Bubble 1 and 2 are moving left 1 position.
This is pass 2.
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving left 1 position.
Bubble 1 and 2 are moving left 1 position.
This is pass 3.
Bubble 1 and 2 are moving right 1 position.
Bubble 1 and 2 are moving left 1 position.
This is pass 4.
Bubble 1 is not moving.
Bubble 2 is not moving.
Explanation:
so, what's the question/problem ?
you want to know where the bubbles are after all 4 passes ? right at the original position.
you want to know, how such a while loop could look like ?
int i = 3;
// outer count-down to limit the passes
while (i >= 0) // making 4 passes
{
int j = i;
// inner count-down to limit the right moves
while (j > 0)
{
move(bubble1, right, 1);
move(bubble2, right, 1);
j = j - 1; // count-down
}
j = i;
// inner count-down to limit the left moves
while (j > 0)
{
move(bubble1, left, 1);
move(bubble2, left, 1);
j = j - 1; // count-down
}
i = i - 1; // outer count-down
}
which of the following usually provides dhcp services to dynamically assign ip addressing information to wireless clients and connect the wireless network to the internal wired network and the internet?
Controllers usually provide DHCP services to dynamically assign IP addressing information to wireless clients and connect the wireless network to the internal wired network and the internet.
What is a wired network?
We all know that anything physically composed of cables is considered to be "wired." The choices include fiber optic cables, copper wire, and twisted pair cables. Wires are used in a wired network to connect computers, laptops, and other devices to the Internet or another network. Due to the use of one cable per device and the direct and uninterrupted data it provides, a wired network is nearly always quicker than a wireless one.
Four basic categories of wired media are prevalent today:
Twisted-pair cable is a shielded, copper-based kind.Copper-based coaxial cable: Coaxial.Unshielded, copper-based, twisted-pair cable: this is Ethernet.Fiber optic cable is made of glass or plastic.To learn more about wired networks, use the link given
https://brainly.com/question/13103934
#SPJ4
IMPORTANCIAS de las ticc
Las TIC permiten a las empresas comunicarse, compartir informacion y recopilar datos de manera mas rapida, barata y eficiente. Esto reduce los costos operativos, mejora la productividad y aumenta la competitividad en el mercado.
What is comunicarse ?Comunicarse is the Spanish verb meaning "to communicate." It is used to describe the act of exchanging ideas, thoughts, information, or feelings between two or more people. Communication can be verbal or nonverbal, or a combination of both. It is an important part of interpersonal relationships and can be used to build trust and understanding.
Communication also helps us to connect with other people and create meaningful relationships. Through communication, we can learn about each other and develop meaningful connections. By communicating effectively, we can resolve conflicts, share ideas, and make decisions. Comunicarse is an important tool for fostering healthy relationships and better understanding.
To learn more about comunicarse
https://brainly.com/question/24540334
#SPJ1
In order to be an effective employee who knows recent information on loans and laws, in what topic should your information be current?
regional trends
industry politics
regional politics
industry trends
Answer:
industry politics
Explanation:
In order to be an effective employee who knows recent information on loans and laws, your information should be current in industry politics.
This ultimately implies that, an employee who wants to be well-informed and knowledgeable on recent informations on loans and laws, is saddled with the responsibility of gathering and sourcing for informations through industry politics. Thus, the employee must have been involved in working with various industry leaders and most likely to have interacted with various employees working there.
Industry politics can be defined as a group of policies, standards and regulations set by the government to promote and facilitate competitiveness among the private and publicly owned industries.
Answer:
industry politics
Explanation:
the other person is first and correct mark him brainliest!
Listen Systems thinking is a way of assessing a system such as a business system or a computer system. It involves the following elements (select all that apply, omit those that do not.) a) Input b) Unstructured data c) Variables d) Feedback e) Output f) Process
It involves the following elements a) Input, d) Feedback, e) Output, f) Process, So the correct options are a, d, e, f.
What are listen systems?A listening system is a set of equipment and software that is designed to capture, process, and analyze audio signals. This can include microphones, amplifiers, digital signal processors, and software for recording, analyzing, and transcribing speech. Listening systems are used in a variety of applications, such as speech recognition, voice biometrics, and audio surveillance.
Systems thinking is a way of assessing a system such as a business system or a computer system. It involves understanding the inputs, feedback, outputs, and processes within a system. Unstructured data is not an element of Systems thinking. Variables are part of Systems thinking but not specific element.
To know more about biometric visit:
https://brainly.com/question/20318111
#SPJ4
Create a python program that asks the user to input the subject and mark a student received in 5 subjects. Output the word “Fail” or “Pass” if the mark entered is below the pass mark. The program should also print out how much more is required for the student to have reached the pass mark.
Pass mark = 70%
The output should look like:
Chemistry: 80 : Pass: 0% more required to pass
English: 65 : Fail: 5% more required to pass
Biology: 90 : Pass: 0% more required to pass
Math: 70 : Pass: 0% more required to pass
IT: 60 : Fail: 10% more required to pass
The program asks the user to enter their scores for each subject, determines if they passed or failed, and calculates how much more they need to score in order to pass. The percentage needed to pass is never negative thanks to the use of the max() method. The desired format for the results is printed using the f-string format.
Answer the following questions:
Question 4
............ in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address.
Group of answer choices
Transforming
Framing
Separating
Messaging
Question 5
Functions of data link control includes
Group of answer choices
framing
flow and error control
addressing
All of above
Question 6
In which of the following modes of the CLI could you configure the duplex setting for interface Fast Ethernet 0/5?
Group of answer choices
User mode
Enable mode
Global configuration mode
VLAN mode
Interface configuration mode
Question 7
It is how the receiver detects the start and end of a frame.
Group of answer choices
Error control
Flow control
Framing
None of the above
Question 8
Which of the following describes a way to disable IEEE standard autonegotiation on a 0/00 port on a Cisco switch?
Group of answer choices
Configure the negotiate disable interface subcommand
Configure the no negotiate interface subcommand
Configure the speed 00 interface subcommand
Configure the duplex half interface subcommand
Configure the duplex full interface subcommand
Configure the speed 00 and duplex full interface subcommands
Question 9
______ substitutes eight consecutive zeros with 000VB0VB.
Group of answer choices
B4B8
HDB3
B8ZS
none of the above
Question 0
In _________ transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits.
Group of answer choices
synchronous
asynchronous
isochronous
none of the above
Question
In _______ transmission, bits are transmitted over a single wire, one at a time.
Group of answer choices
asynchronous serial
synchronous serial
parallel
(a) and (b)
Question 2
Digital data refers to information that is
Group of answer choices
Continuous
Discrete
Bits
Bytes
Question 3
Two common scrambling techniques are ________.
Group of answer choices
NRZ and RZ
AMI and NRZ
B8ZS and HDB3
Manchester and differential Manchester
Question 4
________ is the process of converting digital data to a digital signal.
Group of answer choices
Block coding
Line coding
Scrambling
None of the above
Question 5
A switch receives a frame with a destination MAC address that is currently not in the MAC table. What action does the switch perform?
Group of answer choices
It drops the frame. .
It floods the frame out of all active ports, except the origination port.
It sends out an ARP request looking for the MAC address.
It returns the frame to the sender
Question 6
The _______ layer changes bits into electromagnetic signals.
Group of answer choices
Physical
Data link
Transport
None of the above
Question 7
Serial transmission occurs in
Group of answer choices
way
2 ways
3 ways
4 ways
Question 8
What type of switch memory is used to store the configuration used by the switch when it is up and working?
Group of answer choices
RAM
ROM
Flash
NVRAM
Question 9
In what modes can you type the command show mac address-table and expect to get a response with MAC table entries? (Select Two)
Group of answer choices
User mode
Enable mode
Global configuration mode
Interface configuration mode
Question 20
Which of the following are true when comparing TCP/IP to the OSI Reference Model? (Select Two)
Group of answer choices
The TCP/IP model has seven layers while the OSI model has only four layers.
The TCP/IP model has four or five layers while the OSI model has seven layers.
The TCP/IP Application layer maps to the Application, Session, and Presentation layers of the OSI Reference Model.
he TCP/IP Application layer is virtually identical to the OSI Application layer.
Explanation:
4) Seperating
5) All the above
6) Interface configuration mode
7) None of the above
8)Configure the negotiate disable interface subcommand
9) B8ZS
10) Synchronous
11) a and b
2) Discrete
3) B8ZS and HDB3
4) Line coding
5) It drops the frame
6) Data link
7) 2 ways
8) NVRAM
9) User mode-Enable mode
20) The TCP/IP Application layer maps to the Application, Session, and Presentation layers of the OSI Reference Model-
The TCP/IP model has four layers , while the OSI model has seven layers.
What is the default layout position for images added to a Word 2016 document?
A) square, where the text wraps around an image around a square border
B) through, where the text wraps around an image with irregular borders
C) in front of the text, where the image is placed over the text
D) in-line, with the text where the text stays with the image
Answer:
D
Explanation:
Hope it works
Answer:
D) in-line, with the text where the text stays with the image
Explanation:
Just did it in ED.
help meeeeeeeeeeeeeeeee
Answer:
The advantages include much access to photos, digital functions like games and contacts with friends, videos, and you can search questions to anything you like. Disadvantages include things like too much screen time affecting sleep, health, and other physical problems. There is also exposure to explicit content and hatred from strangers.
There are hundreds of editing software for you to try, and many are free to use and are even compatible offline. They can make content related to or look like something in a movie or can be used to make things look nicer and cooler.
. You are an electrician on the job. It is decided that the speed of a large DC motor is to be reduced by connecting a resistor in series with its armature. The DC voltage applied to the motor is 250 V, and the motor has a full-load armature current of 50 A. Your job is to reduce the armature current to 40 A at full load by connecting the resistor in series with the armature. What value of resistance should be used, and what is the power rating of the resistor?
Answer:
The value of resistance that should be used is 12.5 ohms. The power rating of the resistor should be 2,500 watts.
Explanation:
how has State-terrorism done for us and how we can prepare for it?
Answer:
Developing a plan that prepares not just one family but their whole community.
Explanation:
I think a great way to prepare for state-terrorism is by developing a disaster awareness plan. An event that hosts first-responders, medics, policemen, etc. To speak over these circumstances in the event, there are many possibilities with a disaster awareness event, activities for the younger ages that teach kids to be "prepared not scared" this event can go a lot farther than state-terroism a step further would be to prepare people for natural disasters that can occur, and the ways to prepare for this.
How to use this program
Answer:
there is no problem
Explanation:
but i hope i can help one day
Performance assessments are conducted periodically and .
Performance assessments are conducted periodically and systematically.
What are performance assessments ?Periodic and structured evaluations are essential to maintain accurate assessments of performance. These reviews usually occur regularly, such as once or twice a year, and follow a systematic process designed to examine an individual's job-related skills consistently using objective standards.
A typical appraisal procedure generally includes establishing clear aims and goals for the employee, offering regular coaching along with feedback throughout the appraisal term, compiling data related to their task progress, and then conducting a comprehensive review at the end of that period to analyze and assess it thoroughly.
Find out more on performance assessments at https://brainly.com/question/1532968
#SPJ1
State methods of minimizing dust in a computer laboratory.
Answer:
well you could use a blower to remove dust in a computer laboratory
Most of the devices on the network are connected to least two other nodes or processing
centers. Which type of network topology is being described?
bus
data
mesh
star
This is an example of what type of formula? =AVERAGE(D1:D17) A. ADDITION
B.SUBTRACTION C.RANGE D.AVERAGE
Answer:
d average
Explanation:
average as it already shows it says average