PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 17, 2022

[FIXED] how will we use the output of an input statement , what will be used in place of (is)in the command and birthdayRun in a command

 August 17, 2022     if-statement, input, output, python     No comments   

Issue

occasionDay = input()
if occasionDay is 'Birthday':
    birthdayRun()

#what will be used in place of (is) birthdayRun is a command


Solution

You need to replace is with == and it will match the string and if equals to it will run the birthdayRun()

occasionDay = input("Enter:") # you can put value you want to display for user
if occasionDay == 'Birthday':
   birthdayRun()


Answered By - jedimasterbot
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing