• 6 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 5/24/22

Manage Program Logic in Python

Log in or subscribe for free to enjoy all this course has to offer!

Evaluated skills

  • Manage program logic in Python
  • Question 1

    Which data type is used to run an if/else statement in Python?

    • Boolean

    • Integer

    • True/false statements

    • Float

    • Strings

  • Question 2

    Which of the following can be used to check multiple conditions?

    Careful, there are several correct answers.
    • else

    • and

    • while

    • or

    • not

  • Question 3

    Given the following list  global_cities = ["New York", "Paris", "London", "Shanghai"] , which of the following for loops will print each element in the list?

    • For city in global_cities:
      print(city)
    • for city in global_cities;
      print(city)
    • for city in global_cities:
      print(global_cities)
    • for city in global_cities:
      print(city)
    • for city in global_cities
      print(city)