+ 1
Write python program to print the following:
1 13 135 1357
7 Respostas
+ 4
If you want to share this to community as a challenge then please head onto lesson factory.
Else if you want to know how to do this share your attempt first.
You have to practice yourself
https://www.sololearn.com/discuss/1316935/?ref=app
+ 3
string = “”
for i in range(1,8,2):
string += str(i)
print(string)
+ 3
Data Breach range(1,8,2) is a generator function that returns, in order 1, then 3, 5 and lastly 7.
range() takes the format range([start limit],[end limit],[difference]). So here, the start is 1, end is 8 and difference is 2.
+ 2
a = 1
print(a)
b = 13
print(b)
c = 135
print(c)
d = 1357
print(d)
simple mode :)
+ 2
Data Breach no, it prints the wanted pattern, because fist time the var string is 1, then 13, 135 and at the end 1357.
+ 1
Russ that prints 182? does it not?
+ 1
ohhhhh okay thank you Russ