Not sure why my code keeps printing 'wrong answer'

In my code below, when I input the correct answer, the ‘wrong…guess again’ keeps printing. This is within the first if statement. I dont know how to set up a conditional for it to print only when the answer is wrong. thanks for the help. out_of_guesses = False answer = ‘dog’ max_guess = 3 guess… Read More Not sure why my code keeps printing 'wrong answer'

How to print the current filename with a function defined in another file?

Is it possible to print the caller source file name calling a function defined in another file, without passing __FILE__ explicitly and without using preprocessor tricks? // Header.h #include <iostream> #include <string> using namespace std; void Log1(string msg) { cout << __FILE__ << msg << endl; // this prints "Header.h" } void Log2(string file, string… Read More How to print the current filename with a function defined in another file?

Inline css wont toggle, no javascript

I am trying to achieve toggle of div using just inline css but its not working. please note that inline css is required no javascript. Thanks guys. </head> <body> <div> <a id=”hide1″ href=”#hide1″ class=”hide”>+ Expand</a> <a id=”show1″ href=”#show1″ class=”show” style=”display: none;”>- Expand</a> <div class=”details” style=”display: none;”> Content goes here. </div> </div> </body> </html> >Solution :… Read More Inline css wont toggle, no javascript

List wont appear Inline when CSS Rule is added

Here is my HTML: <div class="info"> <ul class="items"> <li> <img id="fb" src="imgs/logo-partner-facebook-Marketing.png" alt="Facebook Marketing Partner Black Logo"> <p>Facebook Premier Level Agency Partner</p> </li> <li> <img id="google" src="imgs/Google-Partner-logo.webp" alt="Google Partner Black Logo"> <p>Google Endorced Marketing Partner</p> </li> <li> <img id="forbes" src="imgs/FAC-Badge-Circle-Blue2022.png" alt="FAC Badge 2022"> <p>Forbes Agency Council Member</p> </li> <li> <img id="inc" src="imgs/Inc5000_PrimaryBlackStackedLogo.png" alt="Inc 500 Black… Read More List wont appear Inline when CSS Rule is added

Retrive only replacement template of regex in C#

can i get only the substitution of the Regex.Replace? Example. String text = @"asdfgs sda gsa ga s SECTOR:124 NAME:Ricko asdfgs sda gsa ga s"; String regex = "^SECTOR:(\d+) NAME:(\w+)"; String substitution = "$2 $1"; String result = Regex.Replace(text, regex, substitution); Console.WriteLine(result); Normal result asdfgs sda gsa ga s Ricko 124 Wanted result Ricko 124… Read More Retrive only replacement template of regex in C#