Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Introduction to if Statement | Python if Statement
TEST FREE COURSE
course content

Course Content

TEST FREE COURSE

bookIntroduction to if Statement

Task

  1. You have the following string: string = 'codefinity';
  2. Count the length of this string and write the result to the variable len_of_string;
  3. Write if statement that checks for the following condition: if the string length is greater than 7 , print the following text: Codefinity is the best platform to start your career in IT.

Fill in the blanks in the code you've already been given.

Once you've completed this task, click the button below the code to check your solution.

123
age = 20 if age > 18: print('You can vote')
copy

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 1
toggle bottom row

bookIntroduction to if Statement

Task

  1. You have the following string: string = 'codefinity';
  2. Count the length of this string and write the result to the variable len_of_string;
  3. Write if statement that checks for the following condition: if the string length is greater than 7 , print the following text: Codefinity is the best platform to start your career in IT.

Fill in the blanks in the code you've already been given.

Once you've completed this task, click the button below the code to check your solution.

123
age = 20 if age > 18: print('You can vote')
copy

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 1
toggle bottom row

bookIntroduction to if Statement

Task

  1. You have the following string: string = 'codefinity';
  2. Count the length of this string and write the result to the variable len_of_string;
  3. Write if statement that checks for the following condition: if the string length is greater than 7 , print the following text: Codefinity is the best platform to start your career in IT.

Fill in the blanks in the code you've already been given.

Once you've completed this task, click the button below the code to check your solution.

123
age = 20 if age > 18: print('You can vote')
copy

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

  1. You have the following string: string = 'codefinity';
  2. Count the length of this string and write the result to the variable len_of_string;
  3. Write if statement that checks for the following condition: if the string length is greater than 7 , print the following text: Codefinity is the best platform to start your career in IT.

Fill in the blanks in the code you've already been given.

Once you've completed this task, click the button below the code to check your solution.

123
age = 20 if age > 18: print('You can vote')
copy

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 1
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt