0

help!! program is not functioning right! Solved

EvenOdd = int(input("even or odd\n even is 0 odd is 1")); HighestNum = int(input(" how high")); if EvenOdd == 0: HighestNum = (HighestNum * 2) + 1; Even = list(range(0,HighestNum,2)); print(Even) elif EvenOdd == 1: HighestNum = (HighestNum * 3) + 1; Odd = list(range(0,HighestNum,3));

31st Jan 2018, 3:21 AM
Camryn Cleveland
Camryn Cleveland - avatar
7 odpowiedzi
+ 2
it is working fine my friend HighestNum = ( HighestNum+1); for both conditions
31st Jan 2018, 4:34 AM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
0
really!! for me the code finishes and show no odd numbers.
31st Jan 2018, 3:43 PM
Camryn Cleveland
Camryn Cleveland - avatar
0
print(odd)
31st Jan 2018, 5:21 PM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
0
the code is working fine but you forgot print(odd)
31st Jan 2018, 5:50 PM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar
0
thanks!! I'll try it right now
31st Jan 2018, 8:05 PM
Camryn Cleveland
Camryn Cleveland - avatar
0
it worked thanks.
31st Jan 2018, 8:07 PM
Camryn Cleveland
Camryn Cleveland - avatar
0
welcome :)
31st Jan 2018, 8:08 PM
Abdurrahman Abulgasim
Abdurrahman Abulgasim - avatar