Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

sqdzesd

# Hello World program in Python
    
your_list = 'abcdefghijklmnopqrstuvwxyz'
complete_list = []
for current in xrange(10):
    a = [i for i in your_list]
    for y in xrange(current):
        a = [x+i for i in your_list for x in a]
    complete_list = complete_list+a
    
print complete_list

Execute Python Online

# Hello World program in Python
    
print "Hello World!\n"

print(5*4)
print(3++2)
print(6*3)
print(3*5+300-45*47)

Execute Python Online

# Hello World program in Python
    
print "Hello World!\n"

omshiva

# Hello World program in Python
    
print "Hello World!\n"

Midpoint

# Hello World program in Python

print "What is the midpoint between A(5,4) and B(-2,7)"

print "X Midpoint is:", (5.0 + -2.0) / 2.0

print "Y Midpoint is:", (4.0 + 7.0) / 2.0

print " or "

print "Midpoint is:", "(",(5.0 + -2.0) / 2.0,", ", (4.0 + 7.0) / 2.0, ")"

print "Midpoint is:", ((5.0 + -2.0) / 2.0 , (4.0 + 7.0) / 2.0)

exercise 3

# Hello World program in Python
    
print "Hello World!\n"

print 7/4

print round(22.0/7.0, 3)

MIdpoint

# Hello World program in Python

a = 15
b = 28
c = 82
d = 91

print "If A=15, b=28, c=82 and d=91,"
print "what is d+a-b*c? \n", d + a - b * c

Midpoint

# Hello World program in Python
    
print "Hello World!\n"
print 7/4

print round(22.0/7.0, 3)

Midpoint

# Hello World program in Python
    
print "Hello World!\n"

print 7/4 

print "What is the midpoint between A(5,4) and B(-2,7)"

print 'x midpoint is:',(5.0+2.0)/2.0
#take both both x values and add them.
# Use decimals because or else you will end up with integers.
print 'y midpoint is:',(4.0+7.0)/2.0
#If you have a error it will tell you what line it went wrong and to look through it.


print 'midpoint is:',(5.0+2.0)/2.0,(4.0+7.0)/2.0

midpoint

# Hello World program in Python
    
print 7/4
 
print round(22.0/7.0,3)

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.