So I'm a bit of a Python beginner and I am wondering if there is a way to modify or fix this script so that it generates random number/letter sequences. I think I've got the actual generation solved, but I need some help on how to print the result to the console. Here is my code:
def main():
import random
random.random() * 10
myList = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
random.choice(myList)
print(random.random() * 10 + random.choice(myList))
main()
Can any of you guys help me out? as I said before, I am a beginner, so it might be a basic mistake and examples in answers would be great. Thanks.
Aucun commentaire:
Enregistrer un commentaire