Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Best NHL Score

ID: 642336 • Letter: B

Question

PHP Help:

1. you only need to use TABLE, TR and TD. However, you cannot simply use

Explanation / Answer

# Create your views here. from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpRequest from .models import UserPicks, Users, Schedule import MySQLdb host = 'mysql.cs.mcgill.ca' username = "tayre" database = '2014fall307tayre' password = '260480603' def connect_to_db(username,password,host,database,echo=False,pool_size=20): print database db = MySQLdb.connect(host, username, password, database) return db.cursor(), db def rankings(request): uid = request.POST['userid'] users = Users.objects.get(user_id = uid) nhl = list(Users.objects.all().order_by('-score_nhl')) nba = list(Users.objects.all().order_by('-score_nba')) total = list(Users.objects.all().order_by('-score_total')) counth = 1 countb = 1 countt = 1 nhl_rank = "RankUsernamePoints" for h in nhl: if counth > 10: counth = 1 break g = '%s%s%s' % (str(counth),str(h.username), str(h.score_nhl)) counth += 1 nhl_rank = nhl_rank + g nhl_rank = nhl_rank + '' nba_rank = "Best NBA ScoreRankUsernamePoints" for b in nba: if countb > 10: countb = 1 break g = '%s%s%s' % (str(countb),str(b.username), str(b.score_nba)) countb += 1 nba_rank = nba_rank + g nba_rank = nba_rank + '' total_rank = "Best TOTAL ScoreRankUsernamePoints" for t in total: if countt > 10: countt = 1 break g = '%s%s%s' % (str(countt),str(t.username), str(t.score_total)) countt += 1 total_rank = total_rank + g total_rank = total_rank + '' return render_to_response('rankings.html',{'nhl_rank' : nhl_rank, 'nba_rank' : nba_rank, 'total_rank' : total_rank, 'users': users},context_instance=RequestContext(request))
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote