subject
Engineering, 16.01.2020 04:31 Disd112984

The following code contains several nested if-else statements. unfortunately,

it

##was written without proper alignment and indentation. rewrite the code and use

the

##proper conventions of alignment and indentation.

## start with input('enter integer score: ') for the variable score.

##a_score = 90

##b_score = 80

##c_score = 70

##d_score = 60

##if score > = a_score:

##print('your grade is a.')

##else:

##if score > = b_score:

##print('your grade is b.')

##else:

##if score > = c_score:

##print('your grade is c.')

##else:

##if score > = d_score:

##print('your grade is d.')

##else:

##print('your grade is f.')



##5. write an if-else statement that assigns true to the again variable if the

##score variable is within the range of 10 to 59. if the score variable’s value

##is outside this range, assign false to the again variable. print the answer.

##start your code with the following:

##test1 = int(input('enter your test1 score: '))

##test2 = int(input('enter your test2 score: '))

##hw = int(input('enter your homework score: '))

##cw = int(input('enter your classwork score: '))

##totals = 0.25*test1 + 0.25*test2 + 0.35*hw + 0.15*cw

## write your code here

##print('is it true that i have to repeat the course again? ' , again )



##6. write nested decision structures that perform the following: if amount1 is

##greater than 10 and amount2 is less than 100, display the greater of amount1

##and amount2.

##solution:

##if amount1 > 10 and amount2 < 100:

## if amount1 > amount2:

## print (amount1)

## elif amount2 > amount1:

## print (amount2)

##else:

## print('both values are the same.')

##

6.1. further extension of 6. write nested decision structures that perform the

##following: if amount1 is greater than 10 and amount2 is less than 100,

##display the greater of amount1 and amount2 if the difference between them is

##more than 33, if not - display the minimum of these amounts.

##start with input('enter integer amount1: ') and input('enter integer amount2: ')

##for these amounts.

##write your code here:

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 19:10
10 kg of co2 is initially contained at 400 kpa and 300 k. the gas constant for carbon dioxide is 189 j/lkg k) and has a specific heat ratio, k, of 1.289. isentropic expansion then occurs until the pressure is 200 kpa. a) determine the initial volume of co2 in m. b) determine the final temperature in k. c) determine the work done by the system during the expansion kl.
Answers: 2
question
Engineering, 04.07.2019 19:10
The proportional limit is always greater than the yield strength for a material. a)-trune b)- false
Answers: 3
question
Engineering, 04.07.2019 19:20
List 3 options on how to reduce knocking problens during engine process,
Answers: 2
question
Engineering, 04.07.2019 19:20
Afan that can provide air speeds up to 60 m/s is to be used in a low-speed wind tunnel with atmospheric air at 35 c. if one wishes to use the wind tunnel to study flat-plate boundary layer behavior up to reynolds numbes of re 10, what is the minimum plate length that should be used? at what distance from the leading edge would transition occur if the critical reynolds nurnber were rer,e = 5 × 105?
Answers: 2
You know the right answer?
The following code contains several nested if-else statements. unfortunately,

it
Questions
question
English, 04.07.2019 17:00
Questions on the website: 13722363