0
Output
How is possible traslate "no output" in " " ? Or better the code has to write nothing
11 odpowiedzi
+ 2
print() will only insert a newline
+ 2
Remove the else statement if you don't want any output
+ 1
Can you show your code ,inputs and expected output?
+ 1
If the requirement is to not output anything if the condition is false, just don't do the opposite, so delete the else branch
0
Thank you but no your solution is not good .. the code writes "No output" and it is not correct for the
examinator unluckly
0
Sing
0
My code
purity = float(input())
if 91.7 < purity < 99.9:
print("Accepted")
else:
print ()
0
Do not output anything is the expected output
0
Sorry but it is the same... the code writes no output and the examinator says no good .... very sad
0
Thanks friends but ... unfortunately I followed your advises but the requirement is not get ..
Why ?
0
This works
purity = float(input())
if 99.9 <= purity <= 100:
print ('Accepted')
if 91.7 <= purity <99.9:
print ('Accepted')