Challenge: Working with Logical Operators
Swipe to start coding
You've been assigned a string variable t. Verify if both of these conditions are met:
- The string's length is under
15characters. - 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 thecountmethod as follows:t.count('n').
You also have a numerical variable a. Determine if either of the following criteria is satisfied:
ais above9475/37.- The remainder when dividing
aby14is below7.
Ratkaisu
Kiitos palautteestasi!
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Tiivistä tämä luku
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.64
Challenge: Working with Logical Operators
Pyyhkäise näyttääksesi valikon
Swipe to start coding
You've been assigned a string variable t. Verify if both of these conditions are met:
- The string's length is under
15characters. - 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 thecountmethod as follows:t.count('n').
You also have a numerical variable a. Determine if either of the following criteria is satisfied:
ais above9475/37.- The remainder when dividing
aby14is below7.
Ratkaisu
Kiitos palautteestasi!
single