Conditionals & Control Flow The Big If


#1


Conditionals & Control Flow
The Big If

What's wrong with this code?


# Make sure that the_flying_circus() returns True
def the_flying_circus():
    if 100==100:    # Start coding here!
        return True# Don't forget to indent
        # the code inside this block!
    elif 12!=12:
        return False# Keep going here.
        # You'll want to add the else statement, too!
    else Not 10>20:
        return True


#2

There should be no expression on else. Also, it's not and not Not.

:slight_smile:


#3

@creat Else statements are left without conditions and not isn't suppose to be capitalized.


#4

Set bool_one equal to the result of False or not True and True .
how to code this give a example please


#5

Can you send a link to the exercise?


#6

https://www.codecademy.com/courses/python-beginner-BxUFN/2/5?curriculum_id=4f89dab3d788890003000096


#7

should we use values or simple the statement itself


#8

They want you to quite literally paste the answers given in the directions into the booleans, although I don't understand the benefit of that... :confused:


#9

no problem i just typed same.. i got output.

I HAVE INTERVIEW ARE THESE 13 CHAPTERS ENOUGH TO CLEAR IT.. OR ??


#10

These are the basics of Python....they are definitely not qualified enough to get you a job.


#11

What can i do then .. suggest me ..
i have mentioned as i know only basics of python.. i did it for my project .in embedded..

im from elec dept


#12

I don't know how much time you have. But, here are few suggestions to speed up learning.

  1. Sams Teach Yourself Python in 24 Hours - Pearsoncmg

  2. Learn Python the Hard Way

  3. HackerRank

Hope this helps! :slight_smile:


#13

Thanks a lot pal..
i think i can try hacker rank immediately after doing code academy.. i have one week time


#14

Okay, all the best.

Have fun coding! :slight_smile:


#15

HI i need help!!

https://www.codecademy.com/en/courses/python-beginner-2W5v7/0/3?curriculum_id=4f89dab3d788890003000096

print 'Welcome to the Pig Latin Translator!'

Start coding here!
my_variable = "original"
original = raw_input("Enter a word:")
print "original"

is the program correct.. or shouldn't i use print "original"


#16

You don't need this:

You already declared your new variable in the next line.

See full below now.

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")
print 'original'

#17

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.