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
Dima020 [189]
3 years ago
7

Fill in the missing word in this program. class TooWide(Exception): pass answer = input('How wide is it? ') width = float(answer

) try: if width > 30: raise TooWide else: print("Have a nice trip!") -------TooWide: print("Your luggage will not fit in the overhead bin.")
Computers and Technology
1 answer:
seropon [69]3 years ago
6 0

Answer:

Replace ______ with except

Explanation:

Your program is an illustration to try except in Python

When the Python interpreter sees a try statement, it expects a corresponding an except statement

So, the complete program is:

class TooWide(Exception): pass

answer = input('How wide is it? ')

width = float(answer)

try:

     if width > 30:

           raise TooWide

     else:

           print("Have a nice trip!")

except TooWide:

     print("Your luggage will not fit in the overhead bin.")

You might be interested in
What would the output be if we replaced the math expression in the last line with dependents * ((yearsOnJob - 1) * 4) - 6 and th
Leona [35]

Answer:

Please check the explanation.

Explanation:

Let x=dependents * ((yearsOnJob - 1) * 4) - 6

where dependents=3

Lets supppose year on job 3

then

x=( 3*((3-1)*4)-6

x= 3*8 -6

= 24-6

=18

And similarly, we can calculate the value of arithmetic expression all the time.

5 0
3 years ago
A microphone, a track ball, and speakers are all examples of ____. hardware software
djyliett [7]
Hardware . . . . . . . . . . . .  . . . . . . .. 
3 0
3 years ago
Read 2 more answers
What is empowerment technology?
rosijanka [135]
It the use of technological devices such mobile phones and computer devices to help retain and locate information.
3 0
3 years ago
A farmer weighs a dozen chicken eggs.The heaviest is 56 g.​
liubo4ka [24]
I’m sorry but what is the question?
6 0
3 years ago
Write a program in C/C++ to draw the following points: (0.0,0.0), (20.0,0.0), (20.0,20.0), (0.0,20.0) and (10.0,25.0). For this
Fed [463]

Introductory program; just a static picture of a colored triangle.
Shows how to use GLUT.
Has minimal structure: only main() and a display callback.
Uses only the default viewing parameters (in fact, it never mentions viewing at all). This is an orthographic view volume with bounds of -1..1 in all three dimensions.
Draws only using glColor and glVertex within glBegin and glEnd in the display callback.
Uses only the GL_POLYGON drawing mode.
Illustrates glClear and glFlush.
triangle.cpp
// A simple introductory program; its main window contains a static picture
// of a triangle, whose three vertices are red, green and blue. The program
// illustrates viewing with default viewing parameters only.

#ifdef __APPLE_CC__
#include
#else
#include
#endif

// Clears the current window and draws a triangle.
void display() {

// Set every pixel in the frame buffer to the current clear color.
glClear(GL_COLOR_BUFFER_BIT);

// Drawing is done by specifying a sequence of vertices. The way these
// vertices are connected (or not connected) depends on the argument to
// glBegin. GL_POLYGON constructs a filled polygon.
glBegin(GL_POLYGON);
glColor3f(1, 0, 0); glVertex3f(-0.6, -0.75, 0.5);
glColor3f(0, 1, 0); glVertex3f(0.6, -0.75, 0);
glColor3f(0, 0, 1); glVertex3f(0, 0.75, 0);
glEnd();

// Flush drawing command buffer to make drawing happen as soon as possible.
glFlush();
}

// Initializes GLUT, the display mode, and main window; registers callbacks;
// enters the main event loop.
int main(int argc, char** argv) {

// Use a single buffered window in RGB mode (as opposed to a double-buffered
// window or color-index mode).
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

// Position window at (80,80)-(480,380) and give it a title.
glutInitWindowPosition(80, 80);
glutInitWindowSize(400, 300);
glutCreateWindow("A Simple Triangle");

// Tell GLUT that whenever the main window needs to be repainted that it
// should call the function display().
glutDisplayFunc(display);

// Tell GLUT to start reading and processing events. This function
// never returns; the program only exits when the user closes the main
// window or kills the process.
glutMainLoop();
}
6 0
3 years ago
Other questions:
  • Need 9&10. Thank you! Btw it's due today.
    11·1 answer
  • Analog false color in computer graphics
    6·1 answer
  • An organization’s SOC analyst, through examination of the company’s SIEM, discovers what she believes is Chinese-state sponsored
    12·1 answer
  • Although you are not a full administrator, you are asked to manage a protected document, allowing customized access to any inter
    7·1 answer
  • What is the 5 basic steps of computer programing?
    6·1 answer
  • In this section, you will use a stack to implement a program that checks if a string is balanced. Use the skeleton code provided
    5·1 answer
  • On an XBOX 360, what does it mean if you get 4 red rings on your console?
    5·1 answer
  • Before a new email application could be released to the public, it was released for a few days to some account holders of a webs
    14·2 answers
  • Question 2 Multiple Choice Worth 5 points)
    12·1 answer
  • Hue purchased 50 shares of stock on April 24, 2019. The price skyrocketed, so she decided to sell the stock in April of 2020. Wh
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!