Learn to Code via Tutorials on Repl.it!

← Back to all posts
Python tutorial
qerewrad (14)

- My First Tutorial -

Here a simple tutorial by Qerewrad

print("hello user")

Output: hello user

import random, time, os
Name = input("what is your name:\n") 
time.sleep(0.3)
print("welcome",name)
#this clear the txt
os.system("clear")

output:
what is your name:
You:jack
welcome jack

rn = random.randint(1, 1000)
#you can change "rn"
#(1, 1000) from (1) to (1000)

random txt codes

rtxt = ["you'r","he's","she's"]
Rtxt = ["level","xp","win"]
Rnum = random.randint(1, 900)
time.sleep(0.3)
Ra = random.choice(rtxt)
Rb = random.choice(Rtxt)
print(Ra,"",Rb,"is",Rnum)

output:
you'r level/win/xp is???
he's leve/win/xp is???
she's level/win/xp is???

don't forget import