Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Game4
#python 3.6.9 def main(): print ("Hello, world!") # example of how to build a list. mylist = [ ] mylist.append(1) mylist.append(2) mylist.append(3) print(mylist[0]) # prints 1 print(mylist[1]) # prints 2 print(mylist[2]) # prints 3 # prints out 1,2,3 for x in mylist: print(x) sequence or string x = 4 y = 8 list = [1, 2, 3, 4, 5 ]; if ( x in list ): print("Line 1 - x is available in the given list") else: print("Line 1 - x is not available in the given list") if ( y not in list ): print("Line 2 - y is not available in the given list") else: print("Line 2 - y is available in the given list") count = 0 import random from random import randint value = randint(1,10) #1 and 10 represent the range for your #random value print(value) Num1 = value count =+ 1 if count < 3: value2 = randint(1,10) print (value2) #elif (count == 2): value3=randint(1,10) print (value3) else : print("end", Num1) main ()
run
|
edit
|
history
|
help
0
Faiha Lesson 4
Rhymes child
PyRegSetRange
события
PyRef
sai exc 1
TCS Digital phase 1 12 july 2019
binarySearch.py
rectangle perimiter
Decimal, Octal, Hexadecimal and Binary Format