if-statement

mercredi 28 mars 2018

Elif Invalid Syntax error and output error

I keep trying to give the program a condition. If the day is < 0 and > 13 the program should stop and print "Incorrect month". If the month satisfies the conditions it should continue to the day question. However, if the day conditions aren't satisfied it should print "Incorrect day". When the program works it prints the month error correctly but when the day is wrong it prints both incorrect month and day.

I need it to print differently, like this. How do I fix this or write it?

Publié par Unknown à 02:10
Envoyer par e-mailBlogThis!Partager sur XPartager sur FacebookPartager sur Pinterest
Libellés : Newest questions tagged if-statement - Stack Overflow

Aucun commentaire:

Enregistrer un commentaire

Article plus récent Article plus ancien Accueil
Inscription à : Publier les commentaires (Atom)

Qui êtes-vous ?

Unknown
Afficher mon profil complet

Archives du blog

  • ►  2021 (6463)
    • ►  décembre (123)
    • ►  novembre (574)
    • ►  octobre (571)
    • ►  septembre (536)
    • ►  août (544)
    • ►  juillet (534)
    • ►  juin (553)
    • ►  mai (614)
    • ►  avril (598)
    • ►  mars (636)
    • ►  février (558)
    • ►  janvier (622)
  • ►  2020 (7112)
    • ►  décembre (556)
    • ►  novembre (593)
    • ►  octobre (562)
    • ►  septembre (616)
    • ►  août (565)
    • ►  juillet (627)
    • ►  juin (614)
    • ►  mai (562)
    • ►  avril (671)
    • ►  mars (617)
    • ►  février (594)
    • ►  janvier (535)
  • ►  2019 (6304)
    • ►  décembre (537)
    • ►  novembre (597)
    • ►  octobre (590)
    • ►  septembre (532)
    • ►  août (493)
    • ►  juillet (468)
    • ►  juin (437)
    • ►  mai (489)
    • ►  avril (486)
    • ►  mars (633)
    • ►  février (548)
    • ►  janvier (494)
  • ▼  2018 (6255)
    • ►  décembre (494)
    • ►  novembre (616)
    • ►  octobre (641)
    • ►  septembre (553)
    • ►  août (507)
    • ►  juillet (560)
    • ►  juin (310)
    • ►  mai (449)
    • ►  avril (558)
    • ▼  mars (580)
      • I can't get my program to print out a Leap year
      • Programming Novice - C - Issue with Fall-through i...
      • C++ if statement with ||
      • spss IF loop MISSINGS ignored in special cases
      • Code wont ignore numbers
      • React: How to conditionally render?
      • Syntax for conditions(if/else) when "views" should...
      • Python 2: If statements not working
      • Need help in nested if in php
      • purpose of multiple else/if statements? NOT single...
      • Issue with multiple if statements with different o...
      • Ending input() by "if ... is not None" using Pytho...
      • how do I handle with 180000 if statements in c?
      • IF and LOOKUP formula not giving all of the correc...
      • R ifelse statement only return number
      • Filling a table with additional columns if they do...
      • android if Statement
      • Fragment is not grabbing my IntentData
      • Ternary Operator if else if issue
      • MySQL: SET Variable in if exists condition
      • A loop to iterate over different data.frames
      • Counter variable not increasing inside of if state...
      • R:How to repeat for loop from row 1 to last row in...
      • How to map through a object array while it is unce...
      • Why my if elif logic in Python is not working.. Pl...
      • My IF wont work?
      • Kindly help to solve this data validation with use...
      • MySQL While Loop to fillup Table with incremental ...
      • Design pattern for replacing nested if statements ...
      • why all of my data is showed even i've put the con...
      • how to minimize the nested if conditions in the be...
      • Asp.net MVC if statement working in a view but not...
      • Better way to write nested if-else statements
      • No more than a number of the same string name in t...
      • if statement to check list items
      • How do I code a triangle
      • Python "if" statement. Ignore specific input if ce...
      • How to get the real time while opening and closing...
      • What is wrong with this code? VBA
      • wanted to create flag for salary in python
      • multiple actions after if statement in R
      • perl conconditional script not working
      • Char variable comparison issue in java [duplicate]
      • Excel table function: if then or
      • Checking to see if the password matches the partic...
      • Javascript if and for loop confusion
      • Round certainr row
      • How to look through column names in R and perform ...
      • Using 'Case' or 'If' statement in declaration port...
      • How do I fix my if-statement that uses Date values...
      • if in shell scripting not giving actual response [...
      • Javascript if statement only returns true
      • Jenkins declarative pipeline. Conditional statemen...
      • Formula for an algorithm in excel
      • Visual Studio C# if statement not working in Debug
      • PHP IF Statement conditions using content of varia...
      • Why if ... else if ... else have common scope? And...
      • Using VLOOKUP and IMPORTRANGE to find a match and ...
      • Prolog - Custom 'if-then-else'
      • vba excel - if cycle
      • Ruby's if / else in methods
      • Using AND on Android
      • I am trying to sum the columns of specific headers...
      • How to use multiple values for one variable depend...
      • how to fix the display format of the return result...
      • Why does my code ignore the Exception?
      • Why do I get an invalid syntax error while using t...
      • If statements with checkboxgroupinput, how to call...
      • How to take Postal Code Checker using Regular expr...
      • Update textbox through vlookup if value not in range
      • What's the diference between if with OR operators ...
      • Excel MATCH text but return a value to left or rig...
      • Elseif doesn't work properly
      • My 'if' statements are being totally skipped in Ja...
      • What is the correct IF ELSE syntax in SQL server? ...
      • If then else in R
      • php IF / ELSEIF inside IF / ELSEIF
      • Saving worksheet Renditions Within single Workbook...
      • awk to create new variables based on conditions of...
      • RANK IF formula on Google Sheets with SUM
      • Javascript programmer FOR loop with IF logic for c...
      • Python Mulitple For loops with common else
      • How do I implement my randomly generated word into...
      • How do I differentiate radio buttons in android?
      • Java nested if-statment vs if-else
      • How to quickly test the existence and value of a n...
      • Check against multiple - if not - conditions in PHP
      • Elif Invalid Syntax error and output error
      • Too many IF statements Excel / VBA
      • Working with blank user input in if statement
      • if condition not works
      • Logocal or in php? [on hold]
      • Compare Strings with if statenent in C
      • If syntax error on Python
      • Google Sheets Concatenate an Array of IFs
      • I am making a charcter and load out selector to sp...
      • Nested If Loop in For loop does not work (Python)
      • Using MySQL summing up one column by distinct grou...
      • Is there a way to make condition of if static/cons...
      • jQuery if data-id element hasClass not working
    • ►  février (506)
    • ►  janvier (481)
  • ►  2017 (7267)
    • ►  décembre (518)
    • ►  novembre (605)
    • ►  octobre (614)
    • ►  septembre (573)
    • ►  août (539)
    • ►  juillet (580)
    • ►  juin (615)
    • ►  mai (645)
    • ►  avril (661)
    • ►  mars (631)
    • ►  février (650)
    • ►  janvier (636)
  • ►  2016 (7346)
    • ►  décembre (559)
    • ►  novembre (635)
    • ►  octobre (712)
    • ►  septembre (584)
    • ►  août (576)
    • ►  juillet (532)
    • ►  juin (565)
    • ►  mai (601)
    • ►  avril (676)
    • ►  mars (654)
    • ►  février (635)
    • ►  janvier (617)
  • ►  2015 (7558)
    • ►  décembre (623)
    • ►  novembre (703)
    • ►  octobre (716)
    • ►  septembre (649)
    • ►  août (577)
    • ►  juillet (595)
    • ►  juin (617)
    • ►  mai (575)
    • ►  avril (638)
    • ►  mars (701)
    • ►  février (592)
    • ►  janvier (572)
  • ►  2014 (161)
    • ►  décembre (161)
Thème Awesome Inc.. Fourni par Blogger.