The first problem u are getting in the bold portion is due to non-indent block, put one indentation there.second problem is name variable is not definedfollowing is the corrected one -print ("Come-on in. Need help with any bags?") bag=input ('(1) Yes please (2) Nah, thanks (3) Ill get em later TYPE THE NUMBER ONLY') if bag == ('1'): print ("Ok, ill be right there!") if bag == ('2'): print ("Okee, see ya inside. Heh, how rude of me? I'm Daniel by the way, ya?") name="Daniel" print (name + ": Um, Names " + name) print ("Dan: K, nice too ... Read More
To center an image, use the margin-left, margin-right and block CSS properties. You can try to run the following code to center an imageExampleLive Demo img { border: 2px solid orange; border-radius: 3px; padding: 7px; } img { display: block; margin-left: auto; margin-right: auto; width: 50%; }
A number is even if it is divisible by two and odd if it is not divisible by two.Some of the even numbers are −2, 4, 6, 8, 10, 12, 14, 16Some of the odd numbers are −1, 3, 5, 7, 9, 11, 13, 15, 17Check Whether Number is Even or Odd using ModulusA program to check whether number is even or odd using modulus is as follows.Example Live Demo#include using namespace std; int main() { int num = 25; if(num % 2 == 0) cout
To make an image responsive, you can try to run the following code:ExampleLive Demo img { max-width: 100%; height: auto; }
The largest number among three numbers can be found using if statement multiple times. This is given in a program as follows −Example Live Demo#include using namespace std; int main() { int a = 5 ,b = 1 ,c = 9; if(a>b) { if(a>c) cout
The HTML tag is used to play music in the background. This tag is for Internet Explorer only.ExampleYou can try to run the following code to add background music in HTML − HTML bgsound Tag Plays sound file in the background. The HTML tag also supports the following attributes −AttributeValueDescriptionloopnumberLets you replay a background soundtrack a certain number of times.srcURLSpecifies the path of the sound file.
To display a shadow on image hover, use the CSS box-shadow propertyExampleLive Demo img { border: 2px solid orange; border-radius: 3px; padding: 7px; } img:hover { box-shadow: 0 0 2px 2px blue; }
The HTML tag specifies set of options for element. You can try to run the following code to list options for input values in HTML5 −Example HTML Datalist Tag Try to add any of the tutorial name mentioned above.
Use the text-shadow property to create white text with black shadow.You can try to run the following code to implement the text-shadow property:ExampleLive Demo h1 { color: white; text-shadow: 3px 3px 3px #000000; } Heading One Above heading has a text shadow effect.
To create red neon glow shadow, use the text-shadow property. You can try to run the following code to achieve thisExampleLive Demo h1 { text-shadow: 0 0 4px #FF0000; } Heading One Above heading has a read neon glow shadow effect.
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP