User Profile

Collapse

Profile Sidebar

Collapse
c0d3rX
c0d3rX
Last Activity: Nov 25 '18, 05:20 PM
Joined: Nov 19 '18
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • c0d3rX
    started a topic Function sety in turtle graphics color mixer

    Function sety in turtle graphics color mixer

    The following code is from turtle graphics demos, specifically the color mixer demo. The program allows you to adjust the background color of a window using three sliders corresponding to RGB values.

    In the following code there is a statement under the shift function "self.sety(max( 0,min(y,1)))". The purpose of this statement is unclear. Any thoughts on the matter?

    Code:
    # colormixer
    ...
    See more | Go to post

  • c0d3rX
    started a topic Global variables in function object

    Global variables in function object

    The following code is from the turtle graphics demos. The program is a color mixer and allows the user to change the background color of the window using three turtle sliders.

    Under the function definition "main" there are three global variables defined ("screen", "red", and "blue").

    I'm trying to understand the purpose of defining these variables as global within the function...
    See more | Go to post

  • c0d3rX
    started a topic What is the purpose of a continue statement?
    in C

    What is the purpose of a continue statement?

    Does anyone have any good coding examples which use a continue statement. I'm fairly new to C programming and am unfamiliar with continue statements.
    See more | Go to post

  • c0d3rX
    started a topic Creating graphics or windows using C programming
    in C

    Creating graphics or windows using C programming

    I am new to C programming and wondering if it is possible to create graphics and/or generate windows using C programming?
    See more | Go to post

  • c0d3rX
    started a topic Private copy of method in Python base class

    Private copy of method in Python base class

    There is an example of code in Python documentation as follows:

    Code:
    class Mapping:
    	def __init__(self, iterable):
    		self.items_list = []
    		self.__update(iterable)
    	def update(self, iterable):
    		for item in iterable:
    			self.items_list.append(item)
    	__update = update #private copy of original update () method
    In the last line of code is the comment #private...
    See more | Go to post

  • c0d3rX
    replied to Python subclass function call
    Thank you for the response and link provided. I apologize because the code entered in the post was just example code. It does not have functionality. I'm trying to better understand the significance of subclasses and what can be done with them. The link helped clarify some things.
    See more | Go to post

    Leave a comment:


  • c0d3rX
    started a topic Python subclass function call

    Python subclass function call

    My questions is regarding subclasses in Python.

    For example, if I have the following code.

    Code:
    class Myclass:
          def __init__(self, input)
              self.input = input
    
          def function(self, input)
              return output
    
    class MySubclass(Myclass)
          def function(self, input)
              return output
    The...
    See more | Go to post
No activity results to display
Show More
Working...