try using this code:
import pygame
def main():
(tab)screen = pygame.display.set_mode((750,750))
(tab)pygame.display.set_caption("graph")
(tab)screen.fill((255,255,255))
(tab)pygame.draw.line(screen, (0, 0, 0), (375, 0), (375, 750))
(tab)pygame.draw.line(screen, (0, 0, 0), (0, 375), (750, 375))
(tab)pygame.display.flip()
(tab)while True:
(tab)(tab)x = raw_input("x: ")
(tab)(tab)if x 'q':
(tab)(tab)(tab)pygame.quit()
(tab)(tab)(tab)break
(tab)(tab)print ''
(tab)(tab)screen.fill((255,255,255))
(tab)(tab)pygame.draw.line(screen, (0, 0, 0), (375, 0), (375, 750))
(tab)(tab)pygame.draw.line(screen, (0, 0, 0), (0, 375), (750, 375))
(tab)(tab)try:
(tab)(tab)(tab)pygame.draw.circle(screen, (0, 0, 255), (int(x) + 375, -1 * int(y) + 375), 3 )
(tab)(tab)except:
(tab)(tab)(tab)print "graph error, please enter valid x,y coordinates"
(tab)(tab)pygame.display.flip()
main()
pygame.quit()
this code makes a simple grapher.unfortunitly when I typed this answer, the tabs don't show up so I had to do this instead. any time it says "(tab)" just insert a tab there instead.
Python is a scripting language. Which you can use to make games, gui apps, text based apps or anything you want. Python comes "with batteries included" which means that the standard library contains a lot, for many different things.
Python is a high-level, interpreted programming language known for its simple and readable syntax. It is widely used for web development, data analysis, artificial intelligence, machine learning, automation, and more. Python supports multiple programming paradigms, including object-oriented, procedural, and functional programming. Its large standard library and vibrant community make it one of the most popular and beginner-friendly languages in the world.
As in any programming language use an "if" statement.
In the context of computer programming, Python is an open source programming language. I put some links that I found helpful when learning Python on my webpage: http://www.homeworkcat.com
One optional part of python programming is the declaration of variables before use. In many languages, you must declare your variables before using them, but in python, you can simply set a variable equal to something and it will handle the type without your help.
Python is a programming language, it is used to make computer programs. so you could write an antivirus using python.
If you're new to programming, try the How to Think like a Computer Scientist book (make sure you get the Python version!)If you're already a pro and are just learning a new language, Dive into Python is great and it's free online. Also, Core Python Programming by Wesley Chun is great, but it's not free.
Javascript is more easier, while Python is more complex. So, maybe you should try Javascript.
Python is a scripting language. Which you can use to make games, gui apps, text based apps or anything you want. Python comes "with batteries included" which means that the standard library contains a lot, for many different things.
Python is one of the best and simplest programming language used world wide. learning python from a best python training institute in Kochi will make you skilled in this language and you can find many opportunities in Kochi and abroad. Python programmers are needed in many tech sectors. Therefore python programmers demand will be on the rise. Learning python is of good choice.
Lots of programming languages are used to make websites. Some common ones are PHP, Python, and Ruby, but there's nothing ... except common sense ... stopping you from coding a website in COBOL if you really want to.
Python is a high-level, interpreted programming language known for its simple and readable syntax. It is widely used for web development, data analysis, artificial intelligence, machine learning, automation, and more. Python supports multiple programming paradigms, including object-oriented, procedural, and functional programming. Its large standard library and vibrant community make it one of the most popular and beginner-friendly languages in the world.
It is the one of the easiest programming language to learn. -Python is beginner friendly language -If you are interest to start programming to learn Python is one of the easiest programming language. -It is easy to learn,easy to write,easy to understand. -So python is not hard to learn it is very easy to learn.
As in any programming language use an "if" statement.
Microsoft Excel is a spreadsheet program used to make charts containing information. You can make calculations. use graphing tools, and pivot tables. On this program you can enter, analyze, and present data in a organized way.
Py2app for the Mac, or Py2exe for Windows, create a standalone executable file from a Python program, which can run without the Python interpreter. You can always run the application within the Python interpreter. If you want to create an executable file, Python includes no built-in tools to do this; you need an application such as Py2app or Py2exe. Of course, you might search for alternative tools, that do the same thing.
In the context of computer programming, Python is an open source programming language. I put some links that I found helpful when learning Python on my webpage: http://www.homeworkcat.com