Learning Python 3.5 keep fucking this quiz I'm trying to make
https://github.com/SleepOwl/test-quiz-application/issues/2
Count Vowels Function Iwant to make this function operate from the rest
If the random number is 2, ask the user “How many vowels does the word contain?” and prompt user for input. Assess their answer, and then print an appropriate message.
def vowelcount(word):
correct = word_map[word]['vowels']
ans = input('How many vowels does "{}" contain?'.format(word))
return check(int(ans), correct)
is they are a way to place it's out into the def start_test
I normally wouldn't ask but it's giving me the shits
The code in correct formatting is attached at that link location in a text file.
>>56405403
This is the worst possible place to ask and your ESL is showing. Just define your function outside of 'start_test' and call it from within 'start_test'.def vowelcount(word):
...
def start_test(number_questions):
...
>>56405540
how would I call it and sorry I'm super new at this and I'm sorry for my grammar I'm running on a tiny amount of sleep right now
>>56405742
>not knowing how to call a function
Please fuck off.
>>56405742def add(a, b):
return a + b
c = add(5, 7)
print c
>>56405806
He's a novice and he's on the right track. These are the same programs everyone writes when they start out.
>>56405832
>thanks
I just thought there might be a difference when you normally do it that's all. I made that the rest of that myself.