Hello There, Guest!   Inicia Sesion Login Registrate Register La Hora Current time: 6-3-26, 11:01 PM
Login
Username/Email:
Password:
Lost Password?
 
Lenny Face Gaming Forums
  • [ ] Portal
  • [ ] Forum
  • [ ] Members
  • [ ] Calendar
  • [ ] Help
  • Steam Group
  • GameTracker
  • Youtube
Donations | Server List | Admin List | Bans | Praise The Overlord!
Home Lenny Face Gaming Forums › Lenny Face Gaming › General Chat v
« Previous 1 2 3 4 5 … 19 Next »

python help thread
Poll: is lolerez owner
You do not have permission to vote in this poll.
yes
60.00%
3 60.00%
no
40.00%
2 40.00%
Total 5 vote(s) 100%
* You voted for this item. [Show Results]

Threaded Mode
python help thread
« Next Oldest | Next Newest »
Views 3648
Replies 4
Thread Closed 
Users browsing this thread:
lorengze Offline
Forum User
Helpful (21)
Posts: 231
Threads: 36
Thanks: 27 in 20 posts
Thanks Given: 3
Joined: Feb 2016
Warning Level: 0%
#1
11-15-20, 06:24 PM (This post was last modified: 11-15-20, 06:25 PM by lorengze. Edited 1 time in total.)
why does this program not run
NameError: name 'mfunct' is not defined

full thing

M = 3

if M != 0:
    for i in range(M):
        mfunct()
        x = x+120

def mfunct():
    print('hello')
   
 ---------

whats wrong


Attached Files Thumbnail(s)
   
should lolerez be owner
(6 votes total)
yes
3 (50.0%)
no
3 (50.0%)

.
[+]
  •
Find
Demonik1 Offline
Administrator
***
Fantastic (202)
Posts: 1,276
Threads: 124
Thanks: 161 in 122 posts
Thanks Given: 68
Joined: Jul 2016
Warning Level: 0%
gmod_donator_premium
Member
#2
11-15-20, 06:26 PM
You forgot to include the y-1/-3=X after x = x+120
[+]
  •
Find
lorengze Offline
Forum User
Helpful (21)
Posts: 231
Threads: 36
Thanks: 27 in 20 posts
Thanks Given: 3
Joined: Feb 2016
Warning Level: 0%
#3
11-15-20, 06:29 PM (This post was last modified: 11-15-20, 06:29 PM by lorengze. Edit Reason: n )
(11-15-20, 06:26 PM)Demonik1 Wrote: You forgot to include the y-1/-3=X after x = x+120


solved

sonar thanks


Attached Files Thumbnail(s)
   
.
[+]
  •
Find
SaintLuther Offline
Administrator
*******
Legendary (1147)
Posts: 9,413
Threads: 91
Thanks: 1,063 in 805 posts
Thanks Given: 75
Joined: Dec 2014
Warning Level: 0%
Administrators
#4
11-15-20, 06:43 PM
Because you need to define mfunct before you call it. Same with x which is the next error you'll get.
[+]
  •
Website Find
lorengze Offline
Forum User
Helpful (21)
Posts: 231
Threads: 36
Thanks: 27 in 20 posts
Thanks Given: 3
Joined: Feb 2016
Warning Level: 0%
#5
11-15-20, 07:01 PM
(11-15-20, 06:43 PM)SaintLuther Wrote: Because you need to define mfunct before you call it. Same with x which is the next error you'll get.

saint luther wins again!!!
.
[+]
  •
Find
« Next Oldest | Next Newest »
Thread Closed 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

  • Contact Us
  • Lenny Face Gaming Forums
  • Return to Top
  • Lite (Archive) Mode
  • Mark all forums read
  • RSS Syndication