Online Python Compiler

# Hello World program in Python print ("Hello World!"); print ("python") print("\tpython") #The \n is to create a new line \t to create a a space as if hitting the Tab key on keyboard. print("Languages:\n\tPythong\n\tC\n\tJavaScript") banned_users = ['carlos', 'jenny'] user = "Anna" if user not in banned_users: print(user.title() + ", you can post a response in you wish.") print("Accessories:\n\tPhone\n\tWatch\n\tCamera") message = "One of Python's strengths is its diverse community" print(message) coco = ("Hello Mr. Simaj this is just a test.") print(coco) first_name = ("Coco ") last_name = ("Goya") full_name = first_name + "" + last_name print(full_name) print(full_name.title()) print(full_name.upper()) print(full_name.lower()) print('AB:\n"A person who never made a mistake never tried anything"') famous_person = "AB" famous_person.rstrip() famous_person.lstrip() famous_person.strip() pass pass #make sure to always add a space on whatever end of your quotes if you need it when creating a sentence. print(2 + 2 ) age = 24 message = "Happy " + str(age) + "rd Birthday!" print (message) print ( 4 + 4) print ( 2 * 4 ) print (10 - 2 ) print (16.0 / 2) #just storing a number in a variable to create a sentence. REMEMBER to always convert your variable in a string(str) simaj = 7 message = "Jonathan favorite number is " + str(simaj) print (message) #The Zen of Python page 34 bicycles = ['trek','cannondale', 'redline', 'specialized'] print (bicycles) print (bicycles[3]) print (bicycles [0]) print (bicycles[2]) print (bicycles [1]) #Just adding .title() to make the capitolized the first letter print (bicycles[3].title()) print (bicycles[-1].title()) #Alwasy when creating a message remember to use quotations marks message = "There's a " + bicycles[-2].title() + " on the wall." #You have to add a dote in quotations marks because if you dont it wont print it. or just create a full sentence. REMEMBER WHEN ALWAY ADDING A variable you have to add the plus sign on both ends without the quations marks in order to work. print (message) #original list... names= ['Jennifer', 'Sarah', 'Yitzack'] message_2 = "Hey " + names[-3].title() + " would like to go to the gym later." message_3 = "Hey " + names[2].title() + ", I cant go to the movies with you later because Im ganna go with " + names[0] + " to the gym, sorry bro..." print(message_2) print(message_3) #This append command or whatever its called it can be useful to add something to a existing list... names.append('Yesenia') print(names) #The zero was just to tell where the names has the be positioned in the list. names.insert(0,'Carlos') print(names) #just deleted the last names on the list using a negative one inside the brackets. del names[-1] print(names) # I just took the last name and took it out the list then printed it. jojo = names.pop(-1) print(names) print(jojo) print("The name the was remove was " + jojo.title()+ ".") print("Here is the original list:") print(names) print("\nHere is the sorted list:") print(sorted(names)) print("Here is the original list again:") print(names) names.reverse() print (names) len(names) print("How many names are there in the list " + str(len(names))) del names[2] print(names) #This exercis is from page number 46 print("Calors wont be avaible to make to the party") names.append('Joanna') print(names) print ("this is the new list, everyone in it is invited to come.") cars = ['bmw', 'audi', 'toyota', 'subaru'] cars.sort() print(cars) print ("This is my car list") len(cars) print("How many casrs int the list " + str(len(cars))) cars.reverse() print(cars) cars.reverse() print(cars) magicians = ['alice', 'david', 'carolina'] for magician in magicians: print(magician) names = ['Sarah', 'Jennifer', 'Joanna'] for name in names: print(name) dogs_names = ['bear', 'Z', 'speedy', "LitteOne"] for dog in dogs_names: print (dog) #this is from page 55 for magician in magicians: print(magician.title() + ", that was a great trick") print ("I cant wait to see your next trick, " + magician.title()) print("Thank you everyone that was a great show.") #This an exercise from page 60 pizza = ['pepperoni', 'hawaiian', 'cheese'] for pizza in pizza: print("I like "+ pizza.title()+ " pizza...") for value in range (1, 30): print(value) numbers = list(range(0, 10)) print (numbers) for value in range(0, 21): print(value) numbers = list(range(0,9999)) print(numbers) #WHY MIN() , MAX() AND SUM() DIDNT WORK??? digits = [1, 9999] min(digits) max(digits) sum(digits) odd_numbers = list(range(1,21,2)) print(odd_numbers) three = list(range(3,33,3)) for x in three: print(x) cubes = [] for y in range (1,11): cube = y **3 cubes.append(cube) print(cubes) players = ['charles', 'martina', 'michael', 'florence', 'eli'] print(players[0:3]) print(7 % 3) import this sugar= this

About Online Python Compiler

Try our Online Python Compiler (Version Python v3.6.2) to Edit, Run, and Share your Python Code directly from your browser. This online development environment provides you the latest version Python v3.6.2.

How to use Online Python Compiler?

Write and Execute Code

  • Write your program (or, paste it) directly under the "Source Code" tab.
  • If you want to save your program, go to the "Project" menu and save it.
  • You can directly execute your program without saving it by clicking on on "Execute" button.

User Input

The latest version of Coding Ground allows to provide program input at run time from the termnial window exactly the same way as you run your program at your own computer. So simply run a program and provide your program input (if any) from the terminal window available in the right side.

Online Python Compiler: Keyboard Shortcuts

The following are the keyword shortcut of this Online Python Compiler:

ShortcutDescription
⌘ + EnterRun the program
⌘ + SSave Project (Login Required)
⇧ + ⌘ + SSave As Project
⌘ + PNew Project
⌘ + GShare Project
⌘ + ZUndo Editing
⌘ + YRedo Editing
⌘ + ASelect All Text
⌘ + XCut Selected Text
⌘ + CCopy Selected Text
⌘ + VPaste Copied Text
⌘ + FSearch Text
⌘ + ⌥ + FReplace Text
ShortcutDescription
Ctrl + EnterRun the program
Ctrl + SSave Project
Shift + Ctrl + SSave As Project
Ctrl + GShare Project
Ctrl + ZUndo Editing
Ctrl + YRedo Editing
Ctrl + ASelect All Text
Ctrl + XCut Selected Text
Ctrl + CCopy Selected Text
Ctrl + VPaste Copied Text
Ctrl + FSearch Text
Ctrl + HReplace Text

Online Python Compiler: Save and Share Python Code (Project)

Save Python Project Online

You can save your Python Project with us so that you can access this project later on. To save a project you will need to create a login Id with us. So before you save a project, please create a login Id using a link given at the top right corner of this page.

Share Python Project Online

You can use this feature to share your Python Code with your teachers, classmates and colleagues. Just click Share Button and it will create a short link, which can be shared through Email, WhatsApp or even through Social Media. A shared link will be deleted if it has been passive for almost 3 months.

More Features of Online Python Compiler

  • Theme – You can change the current editor's theme from the "Editor Theme" option under "Settings" menu.
  • Font Size – You can change the font size of the editor /compiler from from the "Font Size" option under "Settings" menu.
  • Tab Size – You can change the tab size from the "Tab Size" option under "Settings" Menu.
  • Show/Hide Line Numbers – You can show/hide the line number with the code from the "Show Line Numbers" or "Hide Line Numbers" option under "Settings" Menu.
  • And, many more.

Benefits of Using Online Python Compiler

There are several benefits of using the Online Python Compiler to run your Python code:

  • Platform independence: You can run your code from any device without taking care of operating systems.
  • Convenience: You don't need to install anything for using this.
  • No setup required: There is no need for additional setup to run your code.
  • Updated version: Our online compiler/editors/terminals are the latest up-to-date.
 Execute |  Beautify | Share
My Projects
Change Password
My Profile
Logout
Undo
Redo
Cut
Copy
Paste
Delete
Select All
Find
Find and Replace
Editor Theme
Crimson
Eclipse
Github
Solarized
Cobalt
krTheme
Monokai
Terminal
Textmate
Twilight
Vibrant Ink
Font Size
8px
9px
10px
11px
12px
13px
14px
15px
16px
17px
18px
20px
22px
24px
Tab Size
1
2
3
4
5
6
7
8
Show Invisible
Hide Invisible
Show Line Numbers
Hide Line Numbers
Ace Editor (Default)
Vim Editor
Emacs Editor
Open New Project
Save Project
Save As New Project
Share Project
Search Project
Online Java Compiler
Online Python Compiler
Online C++ Compiler
Online CSharp Compiler
Online C Compiler
Online PHP Compiler
Online R Compiler
Online NumPy Compiler
More Compilers