if문 tag

47 questions


1 answers
102 views
0
I am practicing Python on my own.

I'm going to make a lottery number generator while looking at blogsIt's being applied.import randomnum = int (input (lotto number of games)print(lotto automatic number.)print(----------------------)# ...


2 answers
84 views
0
Is it possible to put various conditions in the form of a list in the if conditional statement?

def chat(): print('start chatbot') while True: inp = input(user :) ifinf == End: print ('Exit chatbot service') break data = Hello or Hi if data: print(How may I help you?) else: print('Will ...


2 answers
125 views
0
Output a function that is not executed Python separately

running = trueWhile running: Guess= str(Enter the code:) If guess=='b2310' Print ('Ko Byung-jae') If guess=='b2321' Print ('Precious Award') If guess=='mk' running = falseprint ('end')If you o...

2 years ago

1 answers
74 views
0
How do I avoid overlapping if statements?

What if there's an if statement inside the if statement?It's hard to see /psudo code)bool conditionA = executeStepA(); //executeStepX only runs when the previous step is successfulif (conditionA){ boo...

2 years ago

1 answers
72 views
0
A simple code question...

I am Parin who is learning Python in many ways.There is one program that is currently in use There is a part that I want to modify, but it doesn't work out well, so I'm asking youFirst of all, this is...

2 years ago

1 answers
86 views
0
Introduction to C language yesterday. I have a question about if and else

I have a question about the C language-based robot programming called Lego Mind Storm Masters!You put if in else again.after executionIn the loopOperation if sensor 1 is greater than 50 Add conditions...

2 years ago

1 answers
135 views
0
To compare multiple variables to a single value

I'm now creating a function that returns a string of three words by comparing several variables with one integer value. I wonder how to write this in Python. For example, x = 0y = 1z = 3Mylist = []if ...


1 answers
76 views
0
Is there a performance difference when asking for conditions with boolean type variable or int type variable in java if statement?

Is there a difference between asking 1byte boolean variable and 4byte int type variable when asking if??To write it down briefly, it is as followsboolean infiniteMode;int gameScore;[1]if(infiniteMode)...

2 years ago

2 answers
72 views
0
Python Briefly Expresses Long If Statements

import numpy as npimport cv2 as cvimg = cv.imread('dp.png')img_h = img.shape[0]img_w = img.shape[1]img_bpp = img.shape[2]print(img_h, img_w, img_bpp)blue = (255,0,0)white = (255,255,255)a = 450b = 0c ...

2 years ago

1 answers
88 views
0
When is else used at the same level as the for / while repetition statement?

for i in range(10): print(i) if i == 9: print(Too big - I'm giving up!) break;else: print(Completed successfully)I don't know why you use else when you have a code like this.At first, I thought the ...

« - 2 - »

© 2024 OneMinuteCode. All rights reserved.