Fix Python Program Issues

Arnab Chakraborty
Updated on 24-Jun-2020 07:26:01

137 Views

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

Center an Image with CSS

Arjun Thakur
Updated on 24-Jun-2020 07:24:59

185 Views

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%;          }                        

Check Whether a Number is Even or Odd in C++

Samual Sam
Updated on 24-Jun-2020 07:24:38

13K+ Views

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

Scale Down an Image with CSS to Make it Responsive

Nishtha Thakur
Updated on 24-Jun-2020 07:22:53

456 Views

To make an image responsive, you can try to run the following code:ExampleLive Demo                    img {             max-width: 100%;             height: auto;          }                        

C++ Program to Find Largest Number Among Three Numbers

Samual Sam
Updated on 24-Jun-2020 07:22:40

5K+ Views

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

Add Background Music in HTML

Vrundesha Joshi
Updated on 24-Jun-2020 07:22:33

11K+ Views

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.

Display Blue Shadow on Image Hover with CSS

Chandu yadav
Updated on 24-Jun-2020 07:21:59

2K+ Views

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;          }                        

Listing Various Options for Input Values in HTML5

Govinda Sai
Updated on 24-Jun-2020 07:21:22

205 Views

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.    

Create White Text with Black Shadow using CSS

Smita Kapse
Updated on 24-Jun-2020 07:19:44

1K+ Views

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.    

Create Red Neon Glow Shadow Using CSS

George John
Updated on 24-Jun-2020 07:18:37

544 Views

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.    

Advertisements