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) value3 = randint(1,10) print (value2) print (value3) elif (count == 3): print("end", Num1) main ()
run
|
edit
|
history
|
help
0
Print lists separated by comma
sum of odd numbers
Variables mutables e inmutables
binarySearch.py
Array
Random SUm
PyRegSetRange
Ugly number
try
inerse_matrix_gauss_jordan