B1 Confusable-words 10 min read Moyen

If vs. Else-if vs. Elsif : Quelle est la différence ?

Tu as des outils pour la logique conditionnelle : if et else if sont les standards, elsif est juste un raccourci spécifique à certains langages.

Grammar Rule in 30 Seconds

Use 'if' to start a condition, 'else' for the alternative, and 'else if' for a second specific option.

  • Use 'if' for your first condition: 'If it rains, stay inside.' (max 20 words)
  • Use 'else' for everything else: 'If it's sunny, go out; else, stay home.'
  • Use 'else if' for a middle option: 'If it's hot, swim; else if it's cool, hike.'
Condition 1 (If) ➡️ Option A | Condition 2 (Else If) ➡️ Option B | No Condition (Else) ➡️ Option C

Overview

### Overview
Salut ! Aujourd'hui, on va plonger dans un sujet qui peut sembler un peu technique au premier abord, mais qui est absolument fondamental pour structurer ta pensée en anglais : la logique conditionnelle avec if, else if et elsif. Si tu t'intéresses au code, ces termes te disent forcément quelque chose.
Mais même en dehors de l'informatique, comprendre comment ces structures fonctionnent va t'aider à exprimer des choix complexes et des scénarios variés de manière beaucoup plus fluide et naturelle.
En gros, maîtriser ces outils, c'est apprendre à donner des instructions claires ou à décrire des situations où le résultat dépend de certaines conditions. Imagine que tu expliques à un collègue comment gérer les priorités au bureau ou que tu discutes avec des amis de ce que vous ferez ce week-end selon la météo. Tu utilises déjà cette logique en français sans même y penser.
En anglais, c'est la même chose, mais avec quelques nuances de structure que nous allons décortiquer ensemble.
Pourquoi c'est important pour toi, en tant que francophone ? Parce que notre langue adore les nuances et les structures parfois complexes (pense au subjonctif !). L'anglais, lui, privilégie souvent une structure très linéaire et logique.
Comprendre if et ses variantes, c'est adopter ce « mindset » anglophone : on pose une condition, on regarde si elle est vraie, et on décide de la suite. C'est propre, c'est efficace, et ça t'évitera bien des malentendus lors de tes prochaines présentations ou emails professionnels.
### How This Grammar Works
Pour bien comprendre comment ça marche, imagine un entonnoir ou un système de tri. La structure if / else if / else permet de créer un chemin de décision où une seule option sera finalement choisie. C'est ce qu'on appelle l'exclusivité mutuelle.
En français, on utilise généralement la structure « Si... sinon si... sinon... ».
  • Le if correspond à notre « Si ».
  • Le else if (ou elsif / elif selon le contexte technique) correspond à notre « Sinon si ».
  • Le else correspond à notre « Sinon » (le cas par défaut).
Le point crucial à comprendre — et c'est là que la magie opère — c'est le concept de short-circuiting (le court-circuit). Dès qu'une condition est remplie (si elle est true), l'anglais s'arrête là. Il exécute l'action correspondante et ignore tout le reste de la chaîne.
C'est très différent d'une série de phrases indépendantes.
Regarde cet exemple simple au bureau :
  1. 1If it's Monday, we have a meeting. (Si c'est lundi, on a une réunion.)
  2. 2Else if it's Friday, we have a wrap-up. (Sinon si c'est vendredi, on fait un bilan.)
  3. 3Else, we work on our projects. (Sinon, on travaille sur nos projets.)
Si on est lundi, la première condition est vraie. On fait la réunion, et on ne regarde même pas si on est vendredi ou un autre jour. Le système passe directement à la suite.
C'est cette efficacité qui rend la communication claire. En tant que francophone, on a parfois tendance à vouloir tout expliquer en même temps, mais ici, on apprend à prioriser.
### Formation Pattern
La structure suit toujours un ordre logique immuable. On commence par le test principal, on ajoute des alternatives si nécessaire, et on finit par une solution de secours.
Voici le schéma classique que tu retrouveras le plus souvent :
  • L'étape 1 : Le if
C'est le point d'entrée. Sans lui, rien ne commence. On pose la condition entre parenthèses (souvent implicites à l'oral) suivie de l'action.
  • L'étape 2 : Le else if (ou ses variantes)
C'est ton plan B, C ou D. Tu peux en avoir autant que tu veux. Attention, le mot exact change selon le langage de programmation ou le contexte technique que tu utilises, mais la logique reste la même.
  • L'étape 3 : Le else
C'est le filet de sécurité. Si aucune des conditions précédentes n'a fonctionné, c'est cette action qui sera choisie.
Voici un tableau comparatif pour t'aider à visualiser les variantes que tu pourrais croiser, notamment si tu travailles dans la tech ou avec des développeurs :
| Terme Anglais | Équivalent Français | Usage / Contexte |
|---|---|---|
| if | Si | La condition initiale, toujours présente. |
| else if | Sinon si | Standard dans la plupart des contextes (Java, JavaScript). |
| elsif | Sinon si | Spécifique à certains langages comme Ruby ou Perl. |
| elif | Sinon si | La version contractée utilisée en Python. |
| else | Sinon / Autrement | Le cas par défaut quand rien d'autre ne s'applique. |
En gros, retiens que else if, elsif et elif sont des cousins germains. Ils font exactement le même travail : proposer une alternative qui n'est testée que si ce qui précède a échoué.
### When To Use It
On utilise cette structure dès qu'on doit faire un choix parmi plusieurs options basées sur des critères précis. Voici trois scénarios typiques pour un niveau B1 :
#### 1. Gérer des priorités ou des horaires
C'est parfait pour organiser ta journée ou expliquer ton emploi du temps.
If the client calls before 10 AM, I will take the call. Else if they call in the afternoon, my assistant will handle it. Else, we will call them back tomorrow.
Ici, tu définis des règles claires. C'est très professionnel et ça montre que tu maîtrises la gestion du temps.
#### 2. Décrire des processus de décision (Customer Service)
Si tu travailles en contact avec des clients, c'est indispensable.
If the product is broken, we offer a refund. Else if the customer changed their mind, we offer a voucher. Else, we cannot accept the return.
Remarque comment chaque étape exclut la suivante. Si le produit est cassé, on ne propose pas le bon d'achat, on va directement au remboursement.
#### 3. Exprimer des préférences personnelles (Socializing)
If it's sunny, let's go to the terrace. Else if it's just cloudy, we can walk in the park. Else, let's stay at the café.
C'est la base d'une conversation naturelle entre amis. Tu proposes des options de manière structurée.
Le petit plus pour sonner naturel :
En anglais parlé, on n'utilise pas toujours les mots else if tels quels. On utilisera souvent otherwise ou if not. Mais comprendre la structure if / else if te donne la base logique pour construire ces phrases correctement.
### Common Mistakes
En tant que francophones, on a quelques réflexes qui peuvent nous trahir. Voici les erreurs classiques à éviter :
1. L'abus du if indépendant (The Multiple Ifs Trap)
C'est l'erreur la plus fréquente. Au lieu de faire une chaîne, on enchaîne les if.
*Mauvais :* If you are a student, you pay 5$. If you are a senior, you pay 7$.
*Pourquoi c'est un problème ?* Si quelqu'un est à la fois étudiant et senior (ça arrive !), il pourrait techniquement déclencher les deux conditions. En utilisant else if, tu clarifies que la personne ne rentre que dans une seule catégorie de prix.
2. La confusion avec actually
Attention ! Quand on veut dire « En fait, si... », on a tendance à dire Actually, if.... Mais actually ne veut pas dire « actuellement ». C'est un faux-ami. Si tu veux introduire une condition alternative, reste sur else if ou otherwise.
3. Oublier le cas par défaut (else)
Les Français aiment laisser les choses un peu ouvertes. Mais en anglais logique, si tu ne prévois pas de else, et qu'aucune condition if n'est remplie, il ne se passe rien. C'est ce qu'on appelle un « silence logique ».
Pour être bien compris, essaie toujours de finir par un else (un « sinon ») pour couvrir tous les autres cas.
4. La ponctuation et la séparation
En français, on peut faire de très longues phrases avec des virgules. En anglais, pour que ta logique if / else if soit claire, n'hésite pas à faire des phrases courtes. Un point après chaque bloc d'action rend ton discours beaucoup plus percutant.
### Contrast With Similar Patterns
Il est facile de confondre cette structure avec d'autres connecteurs logiques. Regardons les différences majeures :
| Structure | Fonction principale | Exemple |
|---|---|---|
| if ... else if | Choix exclusif (un seul gagnant) | If it's red, stop. Else if it's green, go. |
| if ... and if | Conditions cumulatives (les deux doivent être vraies) | If it's cold AND if it's raining, take a coat. |
| whether ... or | Alternative entre deux options précises | I don't know whether he will come or not. |
| unless | La condition négative (à moins que) | I'll go to the beach unless it rains. |
Le unless est particulièrement intéressant pour nous. En français, on dirait « à moins que ». C'est souvent une alternative plus élégante à if not.
*Exemple :* Unless you have a VIP pass, you must wait in line.
C'est plus direct que de dire If you don't have a VIP pass, else if....
### Quick FAQ
1. Est-ce que je peux utiliser else if à l'oral dans une conversation normale ?
Oui, mais ça sonnera un peu formel ou très structuré. Dans une conversation décontractée, on dira plutôt : If it's too expensive, we'll look for something else. Or, if you prefer, we can just go home. Le Or, if... remplace souvent le else if dans le langage parlé.
2. Quelle est la différence entre elsif et elif ?
C'est purement une question de « dialecte » informatique. elsif est le mot-clé en Ruby, alors que elif est celui de Python. Dans une conversation en anglais général, on utilise toujours la forme complète : else if.
3. Est-ce que le else est obligatoire ?
Non, pas du tout ! Tu peux très bien avoir un if tout seul. On l'utilise quand on veut juste préciser ce qui se passe si la condition est remplie, mais que si elle ne l'est pas, le reste n'a pas d'importance ou reste inchangé.
4. Est-ce que je dois utiliser le subjonctif après le if ?
C'est la grande question des francophones ! En anglais, après if, on utilise généralement le présent simple pour parler du futur ou des généralités (ex: If it rains...). Le subjonctif anglais est très rare et se limite souvent à If I were you....
Donc, simplifie-toi la vie : reste sur des temps simples !
En résumé, garde en tête que cette structure est ton alliée pour clarifier tes idées. Que tu sois en train de rédiger un rapport, d'expliquer une règle de jeu ou de coder ton prochain projet, la séquence if -> else if -> else est le squelette de la logique universelle. T'inquiète pas, avec un peu de pratique, ça deviendra un réflexe aussi naturel que de commander ton café le matin !
C'est simple, non ?

The Logical Flow Table

Part Function Natural English Equivalent Example
If
Starts the condition
In the event that
If it rains...
Else if
Adds a second condition
But if / Or if
...else if it snows...
Else
The final alternative
Otherwise / Or else
...else, stay home.
Elsif
Technical contraction
N/A (Coding only)
elsif (x > 0)

Common Contractions and Phrases

Full Form Common Phrase Context
Or else
Do it, or else!
Warning/Threat
Else if
Or if
Conversation
If not
Unless
General usage
If so
If that is true
Confirmation

Meanings

These terms are used to create conditional sentences where an action depends on whether a specific requirement is met.

1

The Primary Condition (If)

Introduces the first requirement or possibility in a logical sequence.

“If you are hungry, we can eat now.”

“I will go if you go.”

2

The Alternative (Else)

Used to describe what happens if the 'if' condition is not met. In spoken English, often replaced by 'otherwise'.

“You must pay the fine, or else you will go to jail.”

“Eat your vegetables; else, no dessert!”

3

The Secondary Condition (Else-if)

Used when the first 'if' is false, but you want to check a second specific condition before giving up.

“If it's 10:00, I'm working; else if it's 12:00, I'm eating.”

“If the red light is on, stop; else if the yellow light is on, slow down.”

4

The Technical Contraction (Elsif)

A specific spelling used in programming languages (like Ruby or Perl) to mean 'else if'.

“The programmer used 'elsif' to save space in the code.”

“You won't find 'elsif' in a standard English dictionary.”

Reference Table

Reference table for If vs. Else-if vs. Elsif : Quelle est la différence ?
Terme But Langages courants Exemple de syntaxe
`if`
Démarre un bloc conditionnel. Toujours vérifié.
Tous (JavaScript, Python, Ruby, Java, C++)
`if (x > 10)`
`else if`
Vérifie une nouvelle condition si le `if` ou `else if` précédent était faux.
JavaScript, Java, C++, C#
`else if (x > 5)`
`elsif`
Un synonyme plus court de `else if`.
Ruby, Perl, Ada
`elsif x > 5`
`elif`
Un autre synonyme plus court de `else if`.
Python, Bash scripting
`elif x > 5:`
`else`
Un bloc par défaut qui s'exécute si aucune des conditions précédentes n'a été remplie.
Tous (JavaScript, Python, Ruby, Java, C++)
`else`

Spectre de formalité

Formel
Should it rain, the event will be moved indoors; otherwise, it will remain outside.

Should it rain, the event will be moved indoors; otherwise, it will remain outside. (Event planning)

Neutre
If it rains, we'll go inside; else, we'll stay here.

If it rains, we'll go inside; else, we'll stay here. (Event planning)

Informel
If it rains, we're going in. If not, we're staying out.

If it rains, we're going in. If not, we're staying out. (Event planning)

Argot
Rain? We're inside. No rain? We're chillin' out here.

Rain? We're inside. No rain? We're chillin' out here. (Event planning)

Flux de logique conditionnelle

Vérification conditionnelle

Vérification principale

  • if Démarre la logique

Vérifications secondaires

  • else if Suite courante
  • elsif Version Ruby/Perl
  • elif Version Python

Option de repli finale

  • else Si rien ne correspond

Comparaison des mots-clés : `else if` vs. `elsif`

`else if`
Universellement compris Utilisé en JS, Java, C++
Deux mots Avec un espace
`elsif` / `elif`
Spécifique au langage Ruby, Python, Perl
Un mot Plus court, sans espace

Quel mot-clé devrais-je utiliser ?

1

Commences-tu une nouvelle vérification conditionnelle ?

YES
Utilise `if`
NO
Passe à l'étape suivante
2

Codes-tu en Python ?

YES
Utilise `elif`
NO
Passe à l'étape suivante
3

Codes-tu en Ruby ou Perl ?

YES
Utilise `elsif`
NO
Utilise `else if`

Mots-clés par famille de langages

🔵

Style C (JS, Java, C#)

  • if
  • else if
  • else
🟡

Python

  • if
  • elif
  • else
🔴

Ruby & Perl

  • if
  • elsif
  • else

Exemples par niveau

1

If it is cold, wear a coat.

If it is cold, wear a coat.

2

If you are happy, smile.

If you are happy, smile.

3

I will come if you ask.

I will come if you ask.

4

If I see him, I will say hello.

If I see him, I will say hello.

1

If you don't like it, don't eat it.

If you don't like it, don't eat it.

2

We can go to the park, or else we can stay here.

We can go to the park, or else we can stay here.

3

If she calls, tell me.

If she calls, tell me.

4

If it rains, we will go to the cinema.

If it rains, we will go to the cinema.

1

If the price is low, buy it; else, wait for a sale.

If the price is low, buy it; else, wait for a sale.

2

If you are tired, sleep; else if you are bored, read a book.

If you are tired, sleep; else if you are bored, read a book.

3

You must study, else you will fail the exam.

You must study, else you will fail the exam.

4

If he arrives early, wait; else if he is late, call him.

If he arrives early, wait; else if he is late, call him.

1

If the results are inconclusive, we must retest; else, we proceed.

If the results are inconclusive, we must retest; else, we proceed.

2

If you had told me, I would have helped; else, I had no idea.

If you had told me, I would have helped; else, I had no idea.

3

The software checks if the user is logged in; else if the guest mode is on, it allows access.

The software checks if the user is logged in; else if the guest mode is on, it allows access.

4

If you find any errors, please let us know; else, enjoy the book.

If you find any errors, please let us know; else, enjoy the book.

1

Should the market crash, we have a backup; else, we remain invested.

Should the market crash, we have a backup; else, we remain invested.

2

If one considers the ethical implications, the choice is clear; else, it remains a gray area.

If one considers the ethical implications, the choice is clear; else, it remains a gray area.

3

The script uses an 'elsif' ladder to handle various user inputs efficiently.

The script uses an 'elsif' ladder to handle various user inputs efficiently.

4

If the treaty is signed, peace is possible; else, conflict is inevitable.

If the treaty is signed, peace is possible; else, conflict is inevitable.

1

Were it not for his intervention, the project would have failed; else, we would be celebrating now.

Were it not for his intervention, the project would have failed; else, we would be celebrating now.

2

The linguistic distinction between 'if' and 'else' mirrors the binary nature of human decision-making.

The linguistic distinction between 'if' and 'else' mirrors the binary nature of human decision-making.

3

If the premise holds, the conclusion follows; else, the entire argument collapses.

If the premise holds, the conclusion follows; else, the entire argument collapses.

4

The code was riddled with 'elsif' statements, suggesting a lack of polymorphic design.

The code was riddled with 'elsif' statements, suggesting a lack of polymorphic design.

Facile à confondre

If vs. Else-if vs. Elsif: What's the Difference? vs If vs. Whether

Both can introduce options, but 'whether' is for two fixed choices, while 'if' is for a condition.

If vs. Else-if vs. Elsif: What's the Difference? vs Else vs. Otherwise

Learners use 'else' as a transition word, which is rare.

If vs. Else-if vs. Elsif: What's the Difference? vs If vs. When

'If' is for possibility; 'when' is for certainty.

Erreurs courantes

If it rain, I stay.

If it rains, I stay.

The 'if' clause often uses the present simple third-person 's'.

I will go if.

I will go if you go.

'If' needs a condition to follow it.

If I am happy then I smile.

If I am happy, I smile.

In modern English, 'then' is often unnecessary and can be replaced by a comma.

If it is hot? Yes.

Is it hot? If so, yes.

Don't use 'if' to ask a simple question.

If you want, else I go.

If you want, stay; otherwise, I'm going.

'Else' needs a result before it.

If it rains, or else we stay.

If it rains, we stay.

Don't mix 'if' and 'or else' in the same clause.

If I will see him, I will tell him.

If I see him, I will tell him.

Don't use 'will' in the 'if' clause.

I used elsif in my email.

I used 'or if' in my email.

'Elsif' is for coding only.

If it's red, stop, else if it's green, go.

If it's red, stop; if it's green, go.

'Else if' is grammatically correct but sounds robotic in speech.

He is coming, else?

He is coming, or what else?

'Else' cannot stand alone at the end of a question like this.

If I was you, I'd go.

If I were you, I'd go.

In formal English, use the subjunctive 'were'.

Should it rain, else we go.

Should it rain, we shall stay; otherwise, we go.

Inverted conditionals need formal balancing.

If the code has an else-if...

If the code has an 'else if'...

Even in technical writing, use the space unless referring to the keyword.

Structures de phrases

If it ___, I will ___.

I need to ___, else I will ___.

If you ___, then ___; else if you ___, then ___.

Should you ___, please ___.

Real World Usage

Texting constant

If u r free, let's hang. Else, ttyl!

Job Interview common

If I am hired, I will work hard; else, I will continue my search.

Ordering Food very common

If you have the vegan option, I'll take that; else, just the salad.

Travel common

If the flight is delayed, call the hotel; else, take a taxi.

Social Media occasional

If you like this post, share it! Else, just keep scrolling.

Coding constant

if (user.admin?) { show_dashboard } elsif (user.guest?) { show_welcome } else { redirect_to_login }

💡

Utilise `else if` par défaut

Quand tu parles de code en général, else if est le terme le plus compris. Utilise-le par défaut, sauf si tu parles spécifiquement d'un langage comme Ruby ou Python.
If the user is logged in, else if they have a guest account.
⚠️

Ne confonds pas `elif` et `elsif`

Attention, Python utilise elif et Ruby/Perl utilisent elsif. Si tu te trompes, ton code ne marchera pas ! Ils font la même chose, mais tu dois utiliser le bon mot-clé pour le bon langage.
My Python code failed because I wrote elsif instead of elif.
🎯

Pense à l'instruction `switch`

Si tu as une très longue liste de else if (plus de 5, par exemple), un switch peut être plus propre et plus efficace. C'est fait pour vérifier une variable par rapport à plein de valeurs possibles.
Instead of a long if-else if chain, consider a switch statement here.
🌍

C'est une question de 'style'

Le choix entre else if, elsif ou elif est juste une décision de conception du langage, souvent appelée 'sucre syntaxique'. C'est une discussion sympa entre développeurs, mais aucun n'est vraiment 'meilleur' que l'autre.
The choice between else if and elsif is mostly a matter of syntactic sugar.

Smart Tips

Change it to 'Otherwise'. It sounds much more natural to native ears.

Else, we can meet tomorrow. Otherwise, we can meet tomorrow.

Check if the book is about computer science. If not, it might be a typo!

He said elsif he was tired... He said that if he was tired...

Use 'Should you' instead of 'If you'.

If you need help, ask. Should you need help, please ask.

Use 'or else' at the end of the condition.

If you don't stop, I will be mad. Stop that, or else!

Prononciation

/ɪf/ you /GO/, I /STAY/

The 'If' Stress

In a conditional sentence, the stress is usually on the 'if' and the main verb of the result.

Stay (rise)... else (fall) leave.

Else Intonation

When using 'else' as an alternative, your voice usually rises on the first option and falls on the 'else' option.

The Choice Pattern

If it's A ↗️, then B ↘️.

Conveys a clear logical consequence.

Mémorise-le

Moyen mnémotechnique

IF starts the car, ELSE IF changes gears, and ELSE is the parking brake.

Association visuelle

Imagine a traffic light. IF it's red, stop. ELSE IF it's yellow, slow down. ELSE (it must be green), go!

Rhyme

If for one, Else if for two, Else for when you're finally through.

Story

A traveler reaches a bridge. IF he has a coin, he crosses. ELSE IF he has a sword, he fights. ELSE, he turns back home.

Word Web

IfElseElse-ifOtherwiseUnlessConditionResult

Défi

Write a 3-step instruction for making coffee using If, Else if, and Else.

Notes culturelles

In Silicon Valley and tech hubs, 'if-else' logic is often used as a metaphor for life decisions.

British speakers often use 'otherwise' or 'or else' more frequently than 'else' in casual conversation.

Legal documents use 'if' and 'else' (often as 'failing which') to create airtight contracts.

'If' comes from the Old English 'gif', meaning 'given that'. 'Else' comes from 'elles', meaning 'other'.

Amorces de conversation

If you could travel anywhere right now, where would you go?

If it rains this weekend, what are your backup plans?

What happens if you forget your keys?

If you were the president, what is the first law you would change?

Sujets d'écriture

Write about your morning routine using at least three 'if' statements.
Describe a difficult decision you made. Use 'if', 'else if', and 'otherwise'.
Imagine a world where it never rains. How would life be different? Use 'if' and 'else'.
Write a set of instructions for a robot to make a sandwich.

Erreurs courantes

Incorrect

Correct


Incorrect

Correct


Incorrect

Correct


Incorrect

Correct

Test Yourself

Choisis le mot-clé correct pour un bloc de code JavaScript.

if (score > 90) { grade = 'A'; } ___ (score > 80) { grade = 'B'; }

✓ Correct! ✗ Not quite. Correct answer: else if
JavaScript, comme Java et C++, utilise le mot-clé en deux mots else if pour les vérifications conditionnelles suivantes.
Quelle phrase décrit correctement le mot-clé pour Python ? Choix multiple

Choose the correct sentence:

✓ Correct! ✗ Not quite. Correct answer: Python uses `elif` for additional conditions.
elif est le mot-clé spécifique que Python utilise comme raccourci pour 'else if'.
Trouve et corrige l'erreur dans cette phrase à propos de Ruby. Error Correction

Find and fix the mistake:

To add another check in Ruby, you use the `else if` keyword.

✓ Correct! ✗ Not quite. Correct answer: To add another check in Ruby, you use the `elsif` keyword.
Ruby est l'un des langages spécifiques qui utilise le raccourci elsif.

Score: /3

Exercices pratiques

8 exercises
Choose the correct word to complete the sentence. Choix multiple

If you are tired, go to bed; ___, you will be grumpy tomorrow.

✓ Correct! ✗ Not quite. Correct answer: else
'Else' provides the alternative result.
Fill in the blank with 'if', 'else', or 'else if'.

___ it is 5 PM, I leave work; ___ it is 6 PM, I am at the gym.

✓ Correct! ✗ Not quite. Correct answer: If / else if
The first starts the condition, the second adds another specific one.
Correct the error in this sentence. Error Correction

Find and fix the mistake:

If I will see her, I will tell her.

✓ Correct! ✗ Not quite. Correct answer: If I see her
We don't use 'will' in the 'if' clause.
Match the condition to the result. Match Pairs

1. If it's hot... 2. Else if it's cold... 3. Else...

✓ Correct! ✗ Not quite. Correct answer: 1-B, 2-A, 3-C
Matching logical conditions to appropriate actions.
Put the words in the correct order. Sentence Reorder

else / study / you / will / fail / hard

✓ Correct! ✗ Not quite. Correct answer: Study hard, else you will fail.
The command comes first, followed by the 'else' alternative.
Is this rule true or false? True False Rule

You can use 'elsif' in a formal business letter.

✓ Correct! ✗ Not quite. Correct answer: False
'Elsif' is a programming keyword, not a standard English word.
Complete the dialogue. Dialogue Completion

A: Are you coming to the party? B: If I finish my work, yes; ___, I'll have to stay home.

✓ Correct! ✗ Not quite. Correct answer: else
'Else' shows the alternative to finishing work.
Rewrite the sentence using 'if'. Sentence Transformation

Stay here or you will get wet.

✓ Correct! ✗ Not quite. Correct answer: If you don't stay here, you will get wet.
The 'or' structure can be transformed into a negative 'if' condition.

Score: /8

Practice Bank

14 exercises
Complète la phrase avec le terme correct. Texte trous

I'm writing in Ruby, so I need to use ___ instead of `else if`.

✓ Correct! ✗ Not quite. Correct answer: elsif
Quelle phrase est correcte pour un développeur C++ ? Choix multiple

Choose the correct sentence:

✓ Correct! ✗ Not quite. Correct answer: In C++, `else if` is the standard for checking another condition.
Trouve et corrige l'erreur dans le commentaire de ce programmeur. Error Correction

My Python code is broken. The `elsif` statement is causing a syntax error.

✓ Correct! ✗ Not quite. Correct answer: My Python code is broken. The `elif` statement is causing a syntax error.
Choisis le mot-clé correct pour Python. Texte trous

The code checks `if user_type == 'admin':`, and then `___ user_type == 'editor':`

✓ Correct! ✗ Not quite. Correct answer: elif
Associe chaque langage de programmation à son mot-clé correct. Match Pairs

Match the language to its 'else if' keyword:

✓ Correct! ✗ Not quite. Correct answer: matched
Traduis le concept en une phrase anglaise correcte. Traduction

Translate into English: In a programming context, what is the most generic, widely understood term for a conditional check that follows an 'if'?

✓ Correct! ✗ Not quite. Correct answer: ["The most generic term is else if.","It's generally called an else if statement."]
Mets les mots dans l'ordre pour former une affirmation correcte. Sentence Reorder

Arrange these words into a sentence:

✓ Correct! ✗ Not quite. Correct answer: `elsif` is Ruby's shorthand for `else if`
Quelle est la déclaration universellement vraie ? Choix multiple

Choose the correct sentence:

✓ Correct! ✗ Not quite. Correct answer: All languages use `if` to start a conditional.
Trouve et corrige l'erreur dans la phrase. Error Correction

Using `elif` in a JavaScript file is a common practice.

✓ Correct! ✗ Not quite. Correct answer: Using `else if` in a JavaScript file is a common practice.
Mets les mots dans l'ordre pour former une règle correcte. Sentence Reorder

Arrange these words into a sentence:

✓ Correct! ✗ Not quite. Correct answer: You must use `elif` when coding in Python.
Associe le terme à sa description. Match Pairs

Match the conditional term to its role:

✓ Correct! ✗ Not quite. Correct answer: matched
Tape la phrase anglaise correcte. Traduction

Translate into English: What is the primary reason for a language to use `elsif` instead of `else if`?

✓ Correct! ✗ Not quite. Correct answer: ["It's mainly for brevity and developer convenience.","The main reason is for conciseness.","It's a stylistic choice for making code shorter."]
Complète le processus de pensée du développeur. Texte trous

Okay, the first check is `if (is_ready)`. The next check must be `___ (is_waiting)` because I am writing in Java.

✓ Correct! ✗ Not quite. Correct answer: else if
Trouve et corrige l'erreur dans cette phrase. Error Correction

The main difference between `if` and `else if` is that `if` is optional.

✓ Correct! ✗ Not quite. Correct answer: The main difference between `if` and `else if` is that `else if` is optional.

Score: /14

FAQ (8)

In English, no. In programming languages like Ruby, yes. In writing, always use 'else if' or 'or if'.

Rarely. It usually follows a comma or a semicolon. Use 'Otherwise' to start a new sentence.

'Unless' means 'if not'. 'Unless it rains' is the same as 'If it doesn't rain'.

Only if the 'if' clause comes at the beginning of the sentence.

It can be! If you don't finish the sentence, it sounds like a threat. 'Do it, or else!'

Yes! 'Who else is coming?' or 'What else do you need?' are very common.

It's a shortcut to save typing and make the code run slightly faster in some older languages.

It's when you put an 'if' inside another 'if'. 'If it's Monday, then if it's raining, I stay home.'

Scaffolded Practice

1

1

2

2

3

3

4

4

Mastery Progress

Needs Practice

Improving

Strong

Mastered

In Other Languages

Spanish high

si / sino / o si no

Spanish has a specific word 'sino' for 'else' when it means 'but instead'.

French high

si / sinon

French 'si' can also mean 'yes' in response to a negative question, which 'if' cannot do.

German moderate

wenn / falls / sonst

German uses 'wenn' for both 'if' and 'when', which is a major point of confusion for learners.

Japanese low

moshi / nara / tara

Japanese conditionals are built into the verb conjugation, not just placed at the start of the sentence.

Arabic moderate

in / idha / law

English uses 'if' for all three, relying on verb tenses to show the difference.

Chinese moderate

rúguǒ / yàobù

Chinese often omits the 'if' word entirely if the context is clear.

Learning Path

Prerequisites

Was this helpful?
Pas encore de commentaires. Soyez le premier à partager vos idées !