I apologize for the messy layout of my code syntax and maybe I don't really understand how to use @forelse and @if in Laravel, this code result is ...
I apologize for the messy layout of my code syntax and maybe I don't really understand how to use @forelse and @if in Laravel, this code result is ...
I'm new to python (and stackoverflow) and have written this short piece of code which declares "suitable for vegetarians" depending on the values of t ...
I need to write a code, using loops, to find out if there is any common element in two lists. So, I wrote the following: However, what I get as out ...
I am trying to check all elements in a list to see if they meet the condition "less than 5". What I'm trying to do is if no numbers in my list are les ...
I have made a piece of code that spits out prime numbers up to the 10001st number. It currently takes up 4 lines of code, and was wondering if I could ...
Is there a Fortran equivalent of Python's for-else statement? For example, the following sorts a list of numbers into different ranges. In Python, it ...
I'm not sure how the continue statement is interpreted when it is inside a for loop with an else clause. If the condition is true, the break will exi ...
I am solving a algorithm problem, and I use both Python and Swift to solve it. In python, I can use a for else syntax solve it easily. But in Swift, I ...
I have a function The idea behind the function is to take a list of tuples and a list of strings as arguments. The tuples contain a mapping of real ...
I'm trying to set a conditional page load on a Form Submit, following "If users select [x + y] option, send them to [x] page". I'm really not that fam ...
I have been working on a project for my course. It's a simple salary calculator, which I have figured out fairly easily and it functions flawlessly. I ...
So, I have an if statement inside of a for loop. The idea is, if the time difference between the current time and an updated time is greater than 24 h ...
I wrote a simple python module that returns the prime numbers up to a given N, using a bool flag is_prime as follows: which outputs: Now, this i ...
i want to seperate validation for both differnt condtion how i can do that using if else or if if or what should i use because i want to send differ ...
I'm trying to fit in an ELSE statement for a variable within a CSV File. CSV File: I have attempted the following: However, regardless of whet ...
I am trying to validate a password in C, and one of my else statements is firing automatically whenever the code runs. I run a test to see if a charac ...
I have a Twitter manager program where one option is searching for tweets containing whatever input the user provides. I am unable to figure out a way ...
I am learning python and couldn't understand what is going on with flag in the below code snippet. Since I have updated the flag to false with in the ...
In some code I was working on, I have a for loop that iterates through a map: And I wondered if there was some way to concisely write something to ...
I'm fairly new to coding and I've come across a problem I can't figure out or find an answer to. Basically everytime the user enters yes into the ra ...