Skip to content

Commit

Permalink
all
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhayanithi committed Oct 11, 2019
1 parent e5c5f71 commit e7db70b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions 19.osmodule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import os

print(os.name)

print(os.getcwd())
Empty file removed index.html
Empty file.
6 changes: 4 additions & 2 deletions projects/apirequests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
import random
import os

url='https://opentdb.com/api.php?amount=10&type=multiple'
originaldata={}
Expand All @@ -15,6 +16,7 @@ def getUsers(url):
originaldata=getUsers(url)

def ask(data,choicearray):

for index in range(len(data)):
q='''
Question.no:{qno}\n
Expand Down Expand Up @@ -50,7 +52,7 @@ def ask(data,choicearray):
if four==correct_answer:
correctchoice=4
choicearray.append(correctchoice)

os.system('cls')
print(q.format(qno=index+1,question=data[index]['question'],category=data[index]['category'],one=one,two=two,three=three,four=four))

answer=int(input(' '))
Expand All @@ -65,4 +67,4 @@ def ask(data,choicearray):
if(choicearray[num]==userchoice[num]):
userscore+=1

print('userscore is {score}'.format(score=userscore))
print('You have answered {score} questions correctly'.format(score=userscore))
1 change: 0 additions & 1 deletion projects/binarysearchtree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
numbers=[]

def createnumlist(array):
for num in range(0,101):
if num%2==0:
Expand Down

0 comments on commit e7db70b

Please sign in to comment.