Random_Modul_Import
Verfasst: Montag 30. April 2018, 14:34
Hallo zusammen,
ich habe Problem bei diesem Code:
import random
value = random.random()
print(value)
Ich möchte das Modul random importieren und damit halt value berechnen. Ich bekomme folgende Fehlermeldung:
C:\Users\DSule\Desktop\python>random.py
Traceback (most recent call last):
File "C:\Users\DSule\Desktop\python\random.py", line 1, in <module>
import random
File "C:\Users\DSule\Desktop\python\random.py", line 2, in <module>
value = random.random()
TypeError: 'module' object is not callable
Warum? Was mache ich falsch?
Dank im Vorab!
J
ich habe Problem bei diesem Code:
import random
value = random.random()
print(value)
Ich möchte das Modul random importieren und damit halt value berechnen. Ich bekomme folgende Fehlermeldung:
C:\Users\DSule\Desktop\python>random.py
Traceback (most recent call last):
File "C:\Users\DSule\Desktop\python\random.py", line 1, in <module>
import random
File "C:\Users\DSule\Desktop\python\random.py", line 2, in <module>
value = random.random()
TypeError: 'module' object is not callable
Warum? Was mache ich falsch?
Dank im Vorab!
J