Course Content
Introduction to Python
Introduction to Python
Challenge: Logical Operators
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Everything was clear?
Challenge: Logical Operators
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Everything was clear?
Challenge: Logical Operators
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.
Everything was clear?
Task
You've been assigned a string variable t
. Verify if both of these conditions are met:
- The string's length is under
15
characters. - The count of the letter
'n'
in this string exceeds2
.
Note
To count the number of occurrences of the letter
'n'
in the string variablet
, use thecount
method as follows:t.count('n')
.
You also have a numerical variable a
. Determine if either of the following criteria is satisfied:
a
is above9475/37
.- The remainder when dividing
a
by14
is below7
.