1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pantera1 [17]
3 years ago
14

Within the try clause of a try statement, you code a. all the statements of the program b. a block of statements that might caus

e an exception c. a block of the statements that are most likely to cause an exception d. only the statements that might cause an exception
Computers and Technology
1 answer:
SVETLANKA909090 [29]3 years ago
5 0

Answer:

B) A block of statement that might cause an exception.

Explanation:

Exception handling is a good programming technique that prevents our program from crashing when an exception occurs during execution. The try clause is used with a catch to handle any exception that might occur, so whenever a statement that might cause an exception is to be used, this should be contained in a try statement block of code.

You might be interested in
Just trying to pass this class
liq [111]

Answer:

A. Your Foreman

Explanation:

They should be trained on whatever you are doing

4 0
3 years ago
You wrote a program to allow the user to guess a number. Complete the code to give the user feedback.
geniusboy [140]

Answer:

The complete program is:

import random

keepGoing = True

num = random.randint(0,9)  

guess = int(input("Your guess: "))

while keepGoing == True:

   if num == guess:

       print("You were correct!")

       keepGoing = False

   else:

       print("You were wrong.")

       guess = int(input("Your guess: "))

       keepGoing = True

Explanation:

<em>To answer this program, I let the computer generate a random number, then let the user make a guess.</em>

<em></em>

This imports the random module

import random

This initializes a Boolean variable keepGoing to True

keepGoing = True

Generate a random number

num = random.randint(0,9)  

Let the user take a guess

guess = int(input("Your guess: "))

The loop is repeated until the user guesses right

while keepGoing == True:

Compare user input to the random number

   if num == guess:

If they are the same, then the user guessed right

       print("You were correct!")

Update keepGoing to False

       keepGoing = False

If otherwise,

   else:

then the user guessed wrong

       print("You were wrong.")

Prompt the user for another number

       guess = int(input("Your guess: "))

Update keepGoing to True

       keepGoing = True

8 0
3 years ago
Read 2 more answers
Jeremy has created a document that has images and a chart. The chart has to be updated manually, and double-clicking on the char
Sedaia [141]
I think the paste option that  jeremy has used is : 
Paste special as formatted text
Which means that now the text existed in usual text format and unclickable as  a link

hope this helps
8 0
3 years ago
Eli has 7 games on his phone. His sister has 6 more than him. Which ratio compares the number of games on Eli’s phone to the num
Ulleksa [173]

Answer:

7:13

Explanation:

First figure out how many his sister has so 6+7=13 so the ratio is 7:13 because of how its worded since it says Eli's games first then thats how you get 7 then his sisters 13 so final answer 7:13 There is you answer

6 0
2 years ago
Read 2 more answers
If you are uncertain how many times a loop should run. What type of a loop should you use?
Oxana [17]

Answer:

While loop

Explanation:

3 0
3 years ago
Other questions:
  • When you buy a trackphone, do you have to pay a monthly wage or do you just need to buy the minutes and that's all?
    13·2 answers
  • Determine whether the relation represents a function. If it is a​ function, state the domain and range.
    6·1 answer
  • Hailey is preparing a questionnaire on the different number systems. He asks the students to write down the correct decimal and
    10·2 answers
  • What type of graphic organizer will help jane compare the results of a student survey about teachers at her school?
    15·2 answers
  • What are the benefits of using a multiview sketch to communicate a design?
    11·1 answer
  • When converting old html code to xhtml, make sure to replace the ____ attribute with the background-color style?
    10·1 answer
  • You are running Windows 8 on your laptop. You install a 64-bit application on it. Where will this application reside on your com
    11·2 answers
  • A _____ is a collection of binary digits, including message data and control characters for formatting and transmitting, sent fr
    10·1 answer
  • Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem
    7·1 answer
  • To obtain your class E learner license, youll need too _
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!