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 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:20
Vibration monitoring this technique uses the noise or vibration created by mechanical equipment and in seme cases by plant systems to detemine their actual condtion. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:20
Select any two (2) areas of applications of chain-drive. (clo4) a)-permanent lubrication necessary b)-hydraulic forklift truck operation c)-rigging and heavy moving materials d)-relatively high maintenance costs e)-costlier than belt drives
Answers: 2
You know the right answer?
The following code contains several nested if-else statements. unfortunately,

it
Questions
question
Physics, 03.02.2020 17:58
question
Chemistry, 03.02.2020 17:58
question
Mathematics, 03.02.2020 17:58
question
Mathematics, 03.02.2020 17:58