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, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
You know the right answer?
The following code contains several nested if-else statements. unfortunately,

it
Questions
question
Mathematics, 05.05.2020 08:16
question
Mathematics, 05.05.2020 08:16
question
History, 05.05.2020 08:16
Questions on the website: 13722367