Devision of floating binary
(100.0001)÷(10.1)

Answers

Answer 1

1.101 is the correct answer for floating-point binary (100.0001)÷(10.1).

The sign of a binary floating-point number is represented by a single bit. A 1 bit indicates a negative number, and a 0 bit indicates a positive number.

What is Binary Number System?

One of the four types of number systems is a binary number system. Binary numbers are represented in computer applications by only two symbols or digits, namely 0 (zero) and 1 (one). The binary numbers in this example are written in the base-2 numeral system. [tex]101_{2}[/tex] is an example of a binary number. In this system, each digit is referred to as a bit.

A binary number is defined in digital electronics and mathematics as a number expressed in the binary system or base 2 numeral system. It denotes numerical values with two distinct symbols: 1 (one) and 0. (zero). The positional notation with 2 as a radix is the base-2 system.

Because of its direct implementation in electronic circuits using logic gates, the binary system is used internally by almost all modern computers and computer-based devices. Every digit is known as a bit.

To know more about Binary Number, visit: https://brainly.com/question/8649831

#SPJ1


Related Questions

Which of the following is the outline of all the stages games go through when
being developed?
(1 point)
production cycle
design cycle
scientific method
alpha stages

Answers

Product Cycle is all the stages games go through when being developed.

What's product cycle?

The product cycle is the period of time from the morning of processing to the finished product during which stocks( raw accoutrements , accoutrements ,semi-finished corridor, and finished factors) live in the manufacturing process. It takes up some of the manufacturing time and comprises of processing and halting phases.

Product cycle for developing a game :

Stage 1 of the game development process :

Although each step in the game development process is important, the original planning cycle has a direct impact on all posterior cycles. It's critical to begin the process of creating a computer game by gathering details about the willed end product, similar as technological specifications.

Stage 2 The product :

The product stage, which is broken down into multiple internal stages, is the stage that takes the longest and requires the topmost labor.

Stage 3 Quality control :

A game of any complexity needs to be tested to insure that it's error-free and bug-free. This is due to the fact that a single issue can have a negative impact on both the stoner experience and the overall enjoyment of a game. As a result, functional,non-functional, and beta testing are constantly carried out.

 

Stage 4 Launch :

The final stage of game product is the product debut, which is largely anticipated by all. But the story does not end with launch. Indeed after a game is finished, there are generally still enough bugs and faults, thus the game development platoon keeps adding new features and perfecting the game coincidently with its release. At the same time, testers gather the first stoner feedback to help inventors make significant adaptations.

Stage 5 Post-production :

Fixes and upgrades need to be continually covered after a game is released on the request to insure that it's stable and performing as intended. Studios should immaculately release updates constantly to cleave to the evolving specialized specifications of platforms.

Learn more about production cycle of game developement click here:

https://brainly.com/question/26006886

#SPJ1

Explain why you would select the waterfall model to implement the baby monitoring system by describing the advantages of using the waterfall model in projects like this which consists of a large scope.

Answers

The waterfall model's benefits includes Teams must follow a set of stages in a waterfall process, never going on until each phase is finished. Smaller projects with clear-cut deliverables from the beginning are best suited for this framework.

Why did you choose waterfall model?

When a project must adhere to stringent guidelines, the waterfall technique is preferable because it calls for deliverables for each step before moving on to the next.

Note that As an alternative, Agile is better suited for teams who want to move quickly, experiment with direction, and start without knowing exactly how the project will turn out.

Therefore, The sequential Waterfall Model separates software development into pre-established segments. Before the following phase can start, each phase must be finished.

Learn more about Waterfall Model from

https://brainly.com/question/14079212
#SPJ1


Why is the I/O subsystem called a subsystem?

Answers

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

What is an IO subsystem?

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.

The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmes and malevolent users.

To learn more about i/o sub system refer to:

https://brainly.com/question/4274507

#SPJ1

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

What is an IO subsystem?The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmers and malevolent users.

To learn more about  I/O subsystem refer to:

https://brainly.com/question/20331489

#SPJ1

Which string method returns true if the character is an uppercase letter?
letter =input("Enter a letter: ")
Oisupper(letter)
Oletter.isUpper()
Oletter.isupper()
OisUpper(letter)

Answers

Answer:

Oletter.isupper()

Explanation:

isupper is all lowercase and it is a method that belongs to a string, so it is letter.isupper()

Answer: letter.isupper()

Explanation:              

Answers

What is this? Can you correct this question

How many subnets and host per subnet are available from network 192.168.43.0 255.255.255.224?

Answers

It should be noted that the number of subnets and hosts available from network 192.168.43.0 255.255.255.224 is 8 and 32, respectively. Only 30 of the 32 hosts are generally functional.

What is a host in computer networking?

A network host is a computer or other device that is connected to a computer network. A host can serve as a server, supplying network users and other hosts with information resources, services, and applications. Each host is given at least one network address.

A computer network is a group of computers that share resources on or provided by network nodes. To communicate with one another, computers use common communication protocols over digital links.

So, in respect to the above response, bear in mind that we may compute the total number of: by putting the information into an online IPv4 subnet calculator.

8 subnets; and30 hosts available for 192.168.43.0 (IP Address) and 255.255.255.224 (Subnet)

Learn more about hosts:

https://brainly.com/question/14258036

#SPJ1

C++ Perform the task specified by each of the following statements:

a) Write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.

b) Write the function prototype for the function in part (a).

c) Write the function header for the function add1AndSum that takes an integer array parameter oneTooSmall and returns an integer.

d) Write the function prototype for the function described in part (c).

Answers

Using the knowledge in computational language in C++ it is possible to write the code that write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.

Writting the code:

a) void zero (long bigIntegers[], int size) //function header

{

//Body of function

}

b) void zero (long [], int); //function prototype

c) int add1AndSum (int oneTooSmall[], int size)//function header

{

//Body of function

}

d) int add1AndSum (int [], int); //function prototype

See more about C++ at brainly.com/question/29225072

#SPJ1

how do you think the internet and social media will impact global communities in the next five years?

Answers

I do think that the internet and social media will impact global communities in the next five years as it will bring about huge growth in the nations economy and also more improvement in the healthcare system.

What is social media, and how does it affect the neighborhood?

In actuality, social media can be advantageous for society. People may connect and their relationships may become deeper as a result. Student learning and development are also encouraged by social media. Additionally, it can help firms grow their clientele and increase their revenue.

Therefore, Future communication will be based on the framework established by what is currently referred to as social media, but it will look very different. By 2033, the amount of data that will be accessible to everyone as well as its ability to influence decisions will have undergone the most significant change.

Learn more about social media  from

https://brainly.com/question/3653791

#SPJ1

Please help! AP CSP problem.

Answers

Answer:

a is the correct answer ok

Someone gives me the idea to increase this title for my thesis MULTI PURPOSE COOPERATIVE AUTOMATED LENDING MANAGEMENT SYSTEM.

Answers

The way to increase this title for the thesis the negative influence of MULTI PURPOSE COOPERATIVE AUTOMATED LENDING MANAGEMENT SYSTEM in an economy.

What does a research thesis entail?

It is a position or assertion that you will support with research. A compelling thesis statement outlines the subject to be covered, condenses the key points, and persuades the reader to keep reading.

Therefore, The major topics that will be discussed in the essay should be summarized in the thesis. Many thesis statements hint at what will be discussed in the essay in addition to stating the argument to be made.

Learn more about thesis forming from

https://brainly.com/question/876674
#SPJ1

Write a loop that continually asks the user what pets the user has until the user enters stop, in which case the loop ends. It should acknowledge the user in the following format. For the first pet, it should say You have one cat. Total # of Pets: 1 if they enter cat, and so on.


Sample Run


What pet do you have? lemur
What pet do you have? parrot
What pet do you have? cat
What pet do you have? stop

Sample Output

What pet do you have? lemur
You have one lemur. Total # of Pets: 1
What pet do you have? parrot
You have one parrot. Total # of Pets: 2
What pet do you have? cat
You have one cat. Total # of Pets: 3
What pet do you have? stop

Answers

Answer:

#include <iostream>

using namespace std;

int main() {

/*

What pet do you have? lemur

parrot

What pet do you have? cat

What pet do you have? stop

*/

string pet;

int num=1;

while (pet!="stop"){

cin>>pet;

cout<<"What pet do you have?";

if (pet!="stop"){

cout<<"you have one "<< pet<<" total numof # is "<<num++<<endl;

}

else{

cout<<"stop";

}

}

}

Explanation:

you did not specify the language so i went with c++

i used while loop which will keep asking the user for an input until he/she write stop in order to break the loop

first i declared the data type of the input

used it as a conditionin the while loop

then printed the input everytime the loop runs

What should be entered to make the loop below print

55

60

65

x = 50

while (x < 65):

x = x + ____

print (x)

Answers

What should be entered to make the loop below print the output 55, 60, 65 is "5". Hence the complete code is:

x = 50

while (x < 65):

x = x + 5

print (x)

What is a loop in coding?

A loop is a set of instructions in computer programming that is repeatedly repeated until a given condition is met. Typically, a process is performed, such as retrieving and modifying data, and then a condition is verified, such as whether a counter has reached a predetermined number.

Loops are control structures that are used to repeat a segment of code a certain number of times or until a specific condition is fulfilled.

Learn more about loop:
https://brainly.com/question/14390367
#SPJ1

which country did poker originate from?

Answers

Poque, a game that dates back to 1441 and that was supposedly invented in Strasbourg, seems to be the first early evidence of the French origin of the game. Poque in particular used a 52-card deck

France/French

Consider this program on the picture attached:
(a) In what programming language is this program implemented?
(b) Why is this program correct? In other words, how does it work?
(c) In what way is the program poorly designed?

Answers

a) javascript (or Ecmascript if you’re fancy like that)

b) the program assigns the immutable variable “arr” to an array of intagers. It then iterates over the items of the array starting at index zero. The current value is declared as “item”. It will then print item cast as a string to the console.

c) this program is poorly designed due to the use of “SetTimeout”. During each iteration, the program will await item milliseconds before printing the item to the console. This affects the speed of the program due to thread sleeps every iteration

This is related to coding. I just have no idea how to do this coding project.

Answers

class brainly

{

public String repeatString(String str, int n)

{

for(n=1;n<=3;n++)

{

System.out.print(str);

}

}

}

Using the knowledge of the computational language in JAVA it is possible to write a code that write a method that takes a string and a int and return to the string.

Writting the code:

public String repeatString(String str, int n)

{

 String text = "";

 

 for (int i = 0; i < n; i++)

     {

       text = text + str;

     }

     

   return text;

}

See more about JAVA at brainly.com/question/18502436

#SPJ1

You are starting a new data project. What is one of the best sources to help you begin? in excel
a, Technical Documentation
b, Queries
c, The database
d, Existing reports

Answers

Technical Documentation is one of the best sources to help you begin in excel. Thus, option A is correct.

What is excel?

Excel is a software tool for creating and distributing spreadsheets, built by Microsoft.

Data analysts and some other customers could make that information simple to examine as content is loaded or altered by grouping items employing tools like Excel.


Technical documentation is a catch-all word for the various types of data produced to explain the performance, use, or construction of a given good, platform, or application.

Therefore, option A is the correct option.

Learn more about excel, here:

https://brainly.com/question/3441128

#SPJ1

Identification where Information Technology is not present to support business processes

Answers

Identification where Information Technology is not present to support business processes is one that   Lacking an IT implementation Plan.

What is the importance of information technology planning?

The accomplishment of the organization's strategic goals and objectives can be helped by this planning.

Note that  the strategic IT plan should include changes that will be required to the organization's information and communications infrastructure as well as the relevance of technology to each of the organization's strategic business goals.

Therefore,  business process would find it difficult to run efficiently without fully functional computers and access to emails and data.

Learn more about business processes from

https://brainly.com/question/14476382
#SPJ1

Write a java program to find the average of any three numbers.​

Answers

import java.util.Scanner;

public class JavaExample {

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

System.out.print("Enter the first number: ");

double num1 = scan.nextDouble();

System.out.print("Enter the second number: ");

double num2 = scan.nextDouble();

System.out.print("Enter the third number: ");

double num3 = scan.nextDouble();

scan.close();

System.out.print("The average of entered numbers is:" + avr(num1, num2, num3) );

}

public static double avr(double a, double b, double c)

{

return (a + b + c) / 3;

}

}

The output is attached to the answer. You can also check it..

Give some examples of when either breaking the rules or following the rules lead to greater good

Answers

Answer:

Sometimes breaking a rule can lead to a positive outcome, especially if the rule prevents the positive. But on the other hand, following the rules, can also lead to the greater good, if the rule doesn't prevent the good from happening.

Explanation:

Which two features are most important for Virtual Reality to provide a smooth and enjoyable experience for the user?

Answers

Immersion and Interaction are the two most important features of virtual reality.

What is Immersion?

Immersion, also known as presence, refers to the degree of reality in which the viewer exists as the protagonist in the virtual environment. By wearing interactive devices such as helmet-mounted displays and data gloves, viewers can immerse themselves in a virtual environment and become a part of it.

What is Interaction?

Interaction refers to the user's ability to manipulate objects in the simulated environment as well as the natural degree of feedback from the real world. Human-computer interaction in VR technology is similar to natural interaction. There are two kinds of interactions: three-degree-of-freedom (3DoF) interactions and six-degree-of-freedom (6DoF) interactions.

What is Virtual reality (VR)?

Virtual reality (VR) is a simulated experience that uses pose tracking and 3D near-eye displays to immerse the user in a virtual world. A computer-generated simulation of a three-dimensional image or environment that can be interacted with in a seemingly real or physical way by a person wearing special electronic equipment, such as a helmet with a screen inside or gloves with sensors

To know more about Virtual Reality (VR), Kindly visit: https://brainly.com/question/13269501

#SPJ1

In reference to computers, what is a firewall?

A) letters, numbers, and special characters assigned to unlock accounts and websites
B) email attachments
C) an installed software element that protects and monitors incoming and outgoing data
D) a second copy of files saved to a cloud

Answers

Answer:

C) an installed software element that protects and monitors incoming and outgoing data

Explanation:

Consider this program on the picture attached:

(a) In what programming language is this program implemented?
(b) Why is this program correct? In other words, how does it work?
(c) In what way is the program poorly designed?

Answers

Answer:

a) Javascript

b) The program works because it iterates through an array and logs each array element into the console

c) It is poorly designed because depending on the array element value, the program will have to wait that many milliseconds before it logs and move on to the next element. This isn't good because the program may take a long time to execute if the array contains elements with large values.

4. Answer the following. a. Write the steps to create new presentation from Blank Presentation. How​

Answers

Create new presentation from a Blank Presentation using  PowerPoint by following these steps:

Launch PowerPoint.Select New from the left pane.

Select an option:

Choose Blank Presentation to start from scratch when creating a presentation.Choose one of the templates to use a ready-made design.To see PowerPoint tips, click Take a Tour, and then click Create.

With PowerPoint on your PC or on any device, you can:

Make a presentation from scratch or from a template.Text, images, art, and videos can all be added.Using PowerPoint Designer, choose a professional design.Include transitions, animations, and movement.Save your presentations to OneDrive so you can access them from your computer, tablet, or phone.Share and collaborate with others, no matter where they are.

To learn more about powerpoint presentations, visit: https://brainly.com/question/23714390

#SPJ9

How do I do this coding project?

Answers

import java.util.*;

class prog

{

public useProperGrammar( String text)

{

int i;

char ch;

String p;

for(i=0;i<text.length();i++)

{

ch = text.charAt(i);

if(ch=='2')

{

p = text.replace('2','to');

}

}

System.out.println("Corrected text:" +p);

}

}

Please compile it before putting to use since I haven't done any compiling work.

Using the knowledge of the computational language in JAVA  it is possible to write a code that write a functions that countain a string using the function signature.

Writting the code:

import java.util.*;

class prog

{

public useProperGrammar( String text)

{

int i;

char ch;

String p;

for(i=0;i<text.length();i++)

{

ch = text.charAt(i);

if(ch=='2')

{

p = text.replace('2','to');

}

}

System.out.println("Corrected text:" +p);

}

}

See more about JAVA at brainly.com/question/18502436

#SPJ1

When purchasing software or downloading music and games online, how can you make legal choices? Use details to support your answer.

Answers

When purchasing software or downloading music and games online, the ways that you make legal choices are to make sure that  depending on the place  you're downloading the music from. Make sure that the service has obtained permission to be distribution of the music and as such it's legal. Otherwise, it  is said to be illegal.

Is it legal to download music for personal use?

The majority of music and film content found on download or file-sharing websites is copyrighted. Downloading any copyrighted music or films is prohibited. A lawsuit for financial damages that might cost you hundreds or even thousands of dollars could be brought against you if you download or share a copyrighted song or movie.

Note that copyright statute guards that music, making it illegal to duplicate and distribute it without the consent of individuals who have an interest in it. In other words, if someone downloads a song without paying for it, they have probably engaged in copyright infringement.

Learn more about downloading music from

https://brainly.com/question/28358289
#SPJ1

Answer:

When purchasing software or downloading music and games online, the ways that you make legal choices are to make sure that  depending on the place  you're downloading the music from. Make sure that the service has obtained permission to be distribution of the music and as such it's legal. Otherwise, it  is said to be illegal.

Explanation:

Networks can use protocols and apply them to (____) and (____) to allow information to be passed from one machine to another in a common format.

Answers

Networks can use protocols and apply them to (formatting) and (processing) to allow information to be passed from one machine to another in a common format.

What are protocols and why do we need them?

A common language for computers would be network protocols. Although the software and hardware used by the computers in a network may be very dissimilar, the use of protocols allows them to communicate with one another.

Therefore, Data, network, transport, and application layers are just a few of the many protocols that make up the Transmission Control Protocol/Internet Protocol (TCP/IP) suite and thus, A protocol is a common set of guidelines for formatting and processing data in networking. Computers can talk to one another thanks to protocols.

Learn more about Networks from

https://brainly.com/question/1027666
#SPJ1

Meaning of learning application software, meaning of Achitertoral /Engineering application software , meaning of Entertainment application software​

Answers

Computer software is referred as a  programming code executed on a computer processor.  It can be machine-level code or written code  for an operating system.

Meaning of given terms:

Learning application software: It can help you in gaining new skills, provide you with proper instructions and even make you continuously learn in different criteria and subjects.

It makes the study more easy , quicker as well as provide continuous assessment to children.

It include Moodle, Blackboard learn etc

Architectural software : It can help in designing, visualizing various formats of given work. From planning homes, to mansions it can provide and turn vision into reality.

It includes AUTOCAD, Sketchup

Entertainment Software: It provides amusement and opportunities for leisure activities. It help in relaxing, enjoying and escaping from the different situations.

It includes Netflix, amazon and Kodi.

Therefore every term has been described.

To learn more about Software from the given link

https://brainly.com/question/24970491

#SPJ13

Format a paragraph border

Answers

The way that you can format a paragraph border  is by:

Pick a phrase, sentence, or paragraph. Click the arrow next to the Borders button on the Home tab. Select the border style you want to use by clicking it in the Borders gallery.

What is a paragraph border?

To format, this can also be done by:

Select the border style you want to use by clicking it in the Borders gallery. The page margins are not the same as these margins. To distinguish a document title or header, paragraph borders are frequently used.When several paragraphs are chosen, the border is applied to them all at once.

Therefore, Press Format. Select the line style you want to use for the border by clicking it in the Style box under Line on the Border tab. Choose the color you want to use from the Color box. To construct the border you want to use, click the border buttons under Border.

Learn more about paragraph from

https://brainly.com/question/1424157
#SPJ1

See full question below

How do you format a paragraph border

model sees communication occurring in five key parts
19. The
20
means the systematic application of scientific or other organized knowledge to practical task
21. The model that shows our communication is influenced by environmental, cultural and personal
factors
22. Shannon Weaver model was proposed in the year
23. Fourth generation computers used
24. Auto Gasoline pump is an example of a
25.
26.
27.
28.
29.
30. A server may run several
31. The first mechanical computer designed by Charles Babbage uses,
32.
33. The first generation of computer uses
34
computer
computer are mainly used in the fields of science and engineering
provides us with necessary diversion
available for educational purposes other than the teacher
are the means of communication
is when two persons communicate with each other.
controls educational technology in every way.
is the order in which the content should be taught for the best teaming within a grade?
is a distortion in a message which affects the flow of communication
refers to the facilities used for motion pictures, television, computer, sounds?
35.
36. Aristotle model proposed in the year
37. The first computer designed by Charles Babbage was called
38. Communication result in sharing of
and
39. A Supercomputer is the very
40.
41. A typical modern computer uses
42
and
is the operation of data per giving instruction
type of computer for processing data
chips
computer are used in scientific calculations, for nation defense and radar systems
43. The person who is responsible in the integration of technology in classroom instruction is-
44. A server run several
45. These are types in the classifications of the computer according to size, Except
46 Second generation computers used.
47.
48. The acronomy SNS stands for
is used to send individual or group messages
49. These are example of Barriers in communication, Except
50. Computer cannot do anything without a
PRI

Answers

Model sees comunication key parts so its 15 x because it sayd on the text

Python programming using def function

Give the user a math quiz where they have
to subtract 2-digit integers. Present them
like this: 67 - 55.
Each time, tell the user whether they are
correct or incorrect. Continue presenting
problems to them until they enter a zero to
quit. At the end print the number right,
the number wrong, and the percent right.

Answers

Explanation:

For this program we'll need to know a couple concepts which are: while loops, user input, variables, converting strings to integers, and basic arithmetic operators, if statements, and the random module.

So let's first just declare the basic function, we can call this "main", or something a bit more descriptive, but for now I'll name it "main".

def main():

   # code will go here

main()

so now from here, we want to initialize some variables. We need to somehow keep track of how many they get correct and how many they've answered.

These two numbers may be the same, but at times they will be different from each other, so we'll need two variables. Let's just call the variable tracking how much have been answered as "answered" and the variable tracking how much are correct as "correct".

These two will initially be zero, since the user hasn't answered any questions or gotten any correct. So now we have the following code

def main():

   correct = 0

   answered  = 0

main()

Now let's use a while loop, which we break out of, once the user inputs zero. This may be a bit tricky if we use a condition since we'll have to ask for input before, so let's just use a while True loop, and then use an if statement to break out of it at the end of the loop.

Now we want to generate two numbers so we can use the random module. To access the functions from the random module you use the import statement which will look like this "import random". Now that you have access to these functions, we can use the randint function which generates random numbers between the two parameters you give it (including those end points). It says two digits, so let's use the endpoints 10 and 98, and I'll explain later why I'm limiting it to 98 and not 99.

The reason we want to limit it to 98 and not 99, is because it's possible for the two randomly generated numbers to be equal to each other, so the answer would be zero. This is a problem because the zero is used to quit the program. So what we can do in this case, is add one to one of the numbers, so they're no longer equal, but if they're equal to 99, then now we have a three digit number.

Now onto the user input for simplicitly, let's assume they enter valid input, all we have to do is store that input in a variable and convert it into an integer. We can immediately convert the input into an integer by surrounding the input by the int to convert it.

we of course want to display them the equation, and we can either do this through string concatenation or f-strings, but f-strings are a bit more easier to read.

So let's code this up:

import random

def main():

   correct = 0

   answered  = 0

   while True:

       num1 = random.randint(10, 98)

       num2 = random.randint(10, 98)

       

       if num1 == num2:
           num2 += 1

       userInput = int(input(f"{num1} - {num2}"))

main()

from here we first need to check if they entered zero and if so, break out of the loop. If they didn't enter zero, check if the userInput is equal to the actual answer and if it is, then add one to correct and finally add one to answered regardless of whether their answer is correct or not.

Outside the loop to display how much they got correct we can use an f-string just like we did previously. Since sometimes we'll get a non-terminating decimal, we can use the round function so it rounds to the nearest hundreth.

So let's code this up:

import random

def main():

   correct = 0

   answered  = 0

   while True:

       num1 = random.randint(10, 98)

       num2 = random.randint(10, 98)

       if num1 == num2: # the answer would be zero
           num2 += 1 # makes sure the answer isn't zero

       userInput = int(input(f"{num1} - {num2}"))

       if userInput == 0: # first check if they want to stop

           break

       if userInput == (num1 - num2):
           correct += 1

       answered += 1

   print(f"Correct: {correct}\nIncorrect: {answered - correct}\nPercent: {round(correct/answered, 2)}")

main()

and that should pretty much be it. The last line is just some formatting so it looks a bit better when displaying.

Other Questions
Write An Argumentative Essay About "The Giver" Book by "Lois Lowry"Prompt:The giver tells Jonas, "Life here is so orderly so predictable - so painless." Jonas says, "We really have to protect people from wrong choices." The (parenthesis) is the question you are answering for the essay.(Do you think this is true? Do we need to take away some freedoms and/or choices in order to keep safe?)I NEED HELP WITH THIS, I NEED THIS IN 2 WEEKS!This school is from Colorado btw. This is a High School. You deposit $500 into a savings account that earns interest annually. The function g(x) = 500(1.06)x can be used to find the amount of money in the savings account, g(x), after x years. What is the range of the function in the context of the problem? [500, ) [0, 500] [0, ) Amys restaurant has budgeted at most $60 to spend this month on gourmet coffee. All international blends cost $8.50 per package and all house blends cost $6.00 per package. She would like to purchase some international blends and at least 3 packages of the house blends. Write a system of linear inequalities that describes this situation. Graph the system. Give a possible solution and describe what it means one of the major risks of pursuing a strategy of tangible or intangible differentiation advantage is that Read the excerpt below from Theodore Roosevel's book "The Naval War of 1812"During the early years of this century England's naval power stood at a height never reached before or since by that of any other nation. On every sea her navlesrode, not only triumphant, but with none to dispute their sway. The inland folk had long claimed the mastery of the ocean, and they had certainly succeeded in makingtheir claim completely good during the time of bloody warfare that followed the breaking out of the French Revolution Since the year 1792 each European nation, inturn, had learned to feel bitter dread of the weight of England's handThe word "bitter" has the connotation of painful or unpleasant to accept as it describes the word "dread." What type of effect does this connotation have on the moodof the excerpt?The use of the word "bitter" means the excerpt has an ominous moodO The use of the word "bitter" means the excerpt has a solemn moodO The use of the word "bitter" means the excerpt has a joyful moodO The use of the word "bitter" means the excerpt has a terrifying mood booker t. washington and w.e.b du bois had very different approaches to promoting equality in a time when the country was focused on working towards social change. whose approach do you feel provided a greater opportunity for success among african americans? explain why. which of the following was not a reason that many labor unions favored government-imposed restrictions on immigration? (a) union leaders were fearful of some immigrants' embrace of socialism, communism, or anarchism (b) immigrants were used by companies as strikebreakers (c) immigrants were often willing to work for lower wages and in dangerous working conditions (d) immigrants were sometimes difficult to unionize because of language barriers (e) immigrants were not willing or able to work in factory environments Can someone help me with this worksheet? What is the federal court process from start to finish and are there advantages or disadvangtages to federal courts versus state courts? a client is partaking in cognitive distortion when he or she exaggerates a negative event to the point that the event has more impact than it deserves. what is this called? What does the underlined word mean in the following sentence?Tengo que lavarme las manos despus de trabajar.showerbathewashcomb A bad contains 7 red marbels and 4 blue marblesA marble is taken from the bag and replacedanother marble is taken from the bagWork out the probability that the two marbles are the same colourGive your answer as a fraction katie company issues $14 million in bonds. the bonds are well received by investors solely based on the excellent reputation and past performance of the company, its products, and its executives. katie most likely is issuing a(n) bond. what the theme for after 20 years& envedent I NEED HELP NOW Sharons volleyball coach wants everyone on her team to find their maximum resting heart rates. She can find her maximum heart rate right now by subtracting her age from 220. When would be BEST for Sharon to find her resting heart rate?Group of answer choicesat the next track meetin the morning when she first wakes upright now during track practiceafter she runs briskly for one mile I need help with the two questions in the screenshot a nurse is observing the interaction between a new mother and the neonate. the nurse notes that the neonate moves the head and eyes to focus on the mother's voice and smile. the nurse interprets this as which behavioral response? Does the compound event consist of two mutually exclusive events?Two dice are rolled. The sum of the dice is a 3 or a 9. given that a file system has been replicated on two disks, if the probability that any of the disks becomes unavailable is 0.001, what is the chance that both disks become unavailable? At a certain time, Janice notices that her digital watch reads a minutes after two o'clock. Fifteen minutes later, it reads b minutes after three o'clock. She is amused to note that a is six times b. What time was it when she looked at her watch for the second time?