ENGR 132 - QUIZ6

ENGR 132 - QUIZ6 - ENGR 132 Wed/Fri 3:30-5:30 Click to edit...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 4/24/11 ENGR 132 Wed/Fri 3:30-5:30
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4/24/11 Quiz 6 Write a given point (x and y) is in. the valid region. in a string variable named R. Example – given x = 0.25 and y= 0.1 22 0 0 .5 0 0 .2 0 .4 0 .6 0 .8 1 x y R E G I O N 2 R E G I O N 1 in c lu d e s r e d lin e R E G I O N 3 in c lu d e s b lu e lin e
Background image of page 2
4/24/11 Solution OR 2 – totally off 4 – some form of if structures 6 – if/elseif/else end but wrong conditional statements 8 – minor mistakes 10 – correct if y <= x R='Region 1' elseif y>=1-x R='Region 3' else R='Region 2' end if y >= 1-x R='Region 3' elseif y <= x R='Region 1' else R='Region 2' end 0 0 .5 0 0 .2 0 .4 0 .6 0 .8 1 x y R E G I O N 2 R E G I O N 1 in c lu d e s r e d lin e R E G I O N 3 in c lu d e s b lu e lin e y = 1-x y = x
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Click to edit Master subtitle style 4/24/11 ENGR 132 Thurs/Tues 9:30-11:30
Background image of page 4
4/24/11 Quiz 6 The speed limit on I-65 is 70 mph. Write the conditional structure to determine if the value stored in a variable car_speed is faster, slower,
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/23/2011 for the course ENGR 132 taught by Professor Kutson during the Spring '11 term at Purdue.

Page1 / 6

ENGR 132 - QUIZ6 - ENGR 132 Wed/Fri 3:30-5:30 Click to edit...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online