# Assignment 1: Python Practice

hi nidhi,
check this out, it will help you.

number_of_happy_tweets = 0

for i in happy_words:
for j in tweets:
if i in j:
number_of_happy_tweets+=1

11 Likes

number_of_happy_tweets = 0

# perform the calculations here

for word in happy_words:
for tweet in tweets:
if word in tweet:
number_of_happy_tweets += 1

11 Likes

I am getting some problem in Determine the number of tweets in the dataset that can be classified as happy, as I have apply loops within loops along with conditional if statement.Please Help!

how can i access the aassignment 1 questions
?

1 Like

What does your current code look like?

When does the assignment get graded?

Go to this page and click on open link under assignment 1 or see the image beside
1 Like

I couldnt find the assignment questions. all i can see is instructions to submit. Can you plz help me out here.

Thanks, doubt is clear.

May be after submission of everyone’s assignment they will evaluate.

1 Like

Plz help me out

2 Likes

Just click on the link above ‘Make a Submission’? Or click on ‘View Notebook’? What are you confused about?

1 Like

Thank you …i got it.

1 Like

Yeah i also did the same after trying alot. Thank you

1 Like

finally completed Assignment 1

4 Likes

what is the problem that you are facing?

open this link and you will see a run button on the top right, click it an drop-down menu will appear choose any one i will recommend Binder, you will be able to see the code and complete the assignment.

in the assignment : The sum of all the numbers divisible by 7 between 18 and 534 is
using for loop the answer is coming out to tbe 20461
but when I use AP formula the result is 20700. is this because of rounding off ? Please help

6 Likes

@ashishvartak superb …
how did you approach ## Problem 3 - Conditions and loops
Q: Calculate and display the sum of all the numbers divisible by 7 between 18 and 534 ?
I am stuck there as I am getting 2 diff ans.

2 Likes