+ 8

How to input number in turtle library

Suppose i want random number(input) circle in my turtle for loop range(input_number) How do this🥺🥺using pydroid3 Android apps https://code.sololearn.com/cpfsf5bZCg7v/?ref=app https://code.sololearn.com/cpfsf5bZCg7v/?ref=app

3rd Sep 2021, 2:27 AM
Shanto bhowmik
Shanto bhowmik - avatar
7 Réponses
+ 4
Shanto Bhowmik you can use turtle prompts, (Syntax:) turtle.numinput(title, prompt, default=None, minval=None, maxval=None) -> float turtle.textinput(title, prompt) -> str #line 8: k = int(turtle.numinput("title", "Enter a numbe:"))
3rd Sep 2021, 8:20 AM
Sousou
Sousou - avatar
+ 3
Sousou tnank you so much 🥰🥰now correct run this code 🥰🥰🥰
3rd Sep 2021, 9:15 AM
Shanto bhowmik
Shanto bhowmik - avatar
+ 2
Shanto Bhowmik Tutle is a graphical library, and you arr using input() (a function to get input from console). If you're using Pydroid3 you can't enter that number because PyDroid3 (an android Python IDE) doesn't let us use console while display a graphical window (for example, Tkinter).
3rd Sep 2021, 3:15 AM
Hacker-KR4636
Hacker-KR4636 - avatar
+ 2
Hacker-KR4636 I didn’t know about this before. Well tikonter can not be used on pydroid3?
3rd Sep 2021, 3:34 AM
Shanto bhowmik
Shanto bhowmik - avatar
+ 1
Ohh, no no, Tkinter actually can be used in PyDroid 3. But on one computer, you can have multiple windows, at least two, one: the console, and the other, the window to view the GUI in development, but in the case of Pydroid3, for mobile devices, it does not allow having the console and the GUI view at the same time, so when you run the program, you have no way to send the input through the console, because also, Pydroid does not support the execution of a Python script that implements a graphical interface from the console
3rd Sep 2021, 4:40 AM
Hacker-KR4636
Hacker-KR4636 - avatar