Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create quiz.py #149

Closed
wants to merge 1 commit into from
Closed

Conversation

P-Dhruva-Teja
Copy link

A quiz program for issue #1

if answer.lower()=='yes':
answer=input('Question 1: Who is the founder of Python ? ')
a = 'Guido van Rossum'
if answer.lower()=='a':

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is : if answer.lower()== a.lower():

print('Wrong Answer :(')
print('The correct answer is :',b,'Python is interpreted language')
answer=input('Question 3: Whether Python is dynamically typed language or statically typed language ? ')
c = 'dynamically typed language'
Copy link

@fredophil fredophil Oct 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that user will not type entirely "dynamically typed language" but just "dynamically".
the below code handles both cases:
c = ['dynamically typed language', 'dynamically']
if answer.lower() in c:

Copy link

@fredophil fredophil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, kindly revview my comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants