0
Anyone correct my code
import random def random_number(x, y): t=random.randint(x, y) return t x=int(input("First Number Is: ")) y=int(input("Second Number Is: ")) i=random_number(x, y) print("Your random number is " + str(i)) file=open("/storage/emulated/0/Download/text.txt", "r") print("Your text is " + "\n" + file.read(i))
6 ответов
+ 3
@Edgar Minasyan
This line will not work in sololearn.
file=open("/storage/emulated...)
The reason behind because your code is compiled on sololearn server and sololearn server cannot access your computer files or storage.
+ 2
If you are going to run the code in sololearn, you must take all of your inputs once at one line and separate them in the code.
+ 2
Edgar Minasyan give your next input in next line.e.g
2
3
And this line also will not work.
file=open(...)
I have already mentioned it.
+ 1
Maninder $ingh is correct
0
No, the problem is in the lines of 5 and 6
0
Thank you so much, it works