Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a rudimentary caesar wheel
so this is a rudimentary caesar wheel built 'from the ground up'. No classes, functions, or imported modules (other than random from the std lib). It proved significantly more time consuming and difficult to write than I anticipated... I learned that lists tend to ignore duplicate (string char) when populating?

Also on my github acct

here's the src:

#!usr/bin/env python3

import random

base_wheel = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n',
new_wheel = []

spinner = random.randint(0,25)

#populate reorganized base_wheel
for b in base_wheel:
	spinner -= 1

word = str(input('enter word: '))

my_letters = list(word.strip())
new_word_list = []

for k,v in list(enumerate(base_wheel)):
	if v in my_letters:

(Apr-12-2018, 01:14 AM)mepyyeti Wrote: learned that lists tend to ignore duplicate (string char) when populating
I'm not quite sure what this should mean. There is no problem to have duplicate elements in a list. In a dict keys are unique, but values - may be not. and set is unordered collection of unique elements

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)