0

Hey Guys Here's My First Python Code But Still Is there any possibility to improves this code :)

https://code.sololearn.com/c7Fb3XoG8iHe/?ref=app

2nd Dec 2018, 10:48 AM
Arfath Yahiya
Arfath Yahiya - avatar
9 Answers
6th Dec 2018, 9:46 AM
Dlite
Dlite - avatar
+ 2
Your code is clean and clear, so actually it is at its most readable state. . If you are aiming for one liner. You can begin with saving the == 0 and ==1 because the boolean values of 0 and 1 are false and true respectively.
2nd Dec 2018, 11:35 AM
Gordon
Gordon - avatar
+ 2
XyzPrince Check my code again, it's shorter now
6th Dec 2018, 9:59 AM
Dlite
Dlite - avatar
+ 1
The function range() works like this: The first argument is start The second argument is end The third argument is step Any clue how to do print odd number by slight altering on your line 10 now^^?
2nd Dec 2018, 2:46 PM
Gordon
Gordon - avatar
6th Dec 2018, 9:52 AM
Arfath Yahiya
Arfath Yahiya - avatar
0
I'm thinking of to to print odd numbers too as of even numbers but I'm unable to make a code for that
2nd Dec 2018, 2:21 PM
Arfath Yahiya
Arfath Yahiya - avatar
0
Hey dude u gotta modify it
6th Dec 2018, 9:48 AM
Arfath Yahiya
Arfath Yahiya - avatar
0
Just now i completed my code
6th Dec 2018, 9:48 AM
Arfath Yahiya
Arfath Yahiya - avatar
0
Good, it works
6th Dec 2018, 9:54 AM
Gordon
Gordon - avatar