Created
September 5, 2022 16:28
-
-
Save NitkarshChourasia/b6d8770aac87733a53457b675a5b4f3e to your computer and use it in GitHub Desktop.
Hello Purshotam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# False, True Statement | |
def false_true(): | |
a = False == (0 > 1) # If printed without assigning it shows nothing and returns exit code 0. | |
b = True == (1 > 2) # So how can we print directly without assigning is it possible like this. | |
print(a,b) | |
###### | |
# False == (2 > 1) | |
# True == (1 > 2) | |
# print(??? How can I, is there a way to print the values of the above statement without assigning?) | |
###### | |
# False = (2 > 1) | |
# True = (2 > 1) | |
# while exceuting it shows -- SyntaxError: cannot assign to False | |
# Query being here, what is the actual difference between assignment and equal? | |
# Aren't setting(assigning)(=) means x equalling certain expression? | |
# false_true() ## To understand all this, I need a strong base in boolean theories. | |
# And, Or, Not Logical Operators | |
def instance1(): | |
x, y = True, True | |
a = (x or y) == True | |
b = (x and y) == True | |
c = (not x) == False # I want real boolean function, this is a fake function just assignment of the | |
print(a,b,c, sep='\n') # boolean values by the programmer. | |
# instance1() | |
def instance2(): | |
x, y = True, False | |
a = (x or y) == True | |
b = (x and y) == True | |
c = (not y) == True | |
# instance2() | |
# def instance3(): | |
# x, y = True, False | |
# a = (x or y) = False | |
# b = (x and y) = False | |
# c = (not x, not y) = True | |
# instance3() | |
# break , Ends loop prematurely | |
def while_exp(): | |
def while_loop(): | |
while(True): | |
xxx #No Infinite Loop ## Change this break with, continue and emptyspace | |
print("Hello World") # Why not create a program out of it,Let me see, If I can do it or not. | |
# import time | |
# time.sleep(0.5) | |
# print('Hello, there let\'s experiment with the while loop.\nSo let\'s go.') | |
# time.sleep(5) | |
# print('Mind you this will also provide documentation of the code through comments.\nSo let\'s start.') | |
# # Can I add clickable button, like it is present in the terminal section. | |
# # Like those which we can also navigate through tabs. | |
# # I would also like to add a menu kind of thing like in linux when we type man man or man help. | |
# time.sleep(5) | |
# print('So here, are the commands you can input from to have a specific results.') | |
# ## Break | |
# time.sleep(5) | |
# print('To have a Break parameter, which will have no infinite loop in the given code snippet. ') | |
# # Break, Continue are parameters or functions? | |
# # Just write here the comments, later while revisiting thigns will click and then you can search it over. | |
# time.sleep(5) | |
# print('So the commands for the given being is:-') | |
# time.sleep(1) | |
# print('Br') | |
# # Let is be your playground, do whatever you want, whatever is required. | |
# time.sleep(1) | |
# print('Break') | |
# time.sleep(1) | |
# print('1') | |
# time.sleep(1) | |
# print('Stop') | |
# ## Continue | |
# time.sleep(1) | |
# print('To have a Continue parameter, which will have dead code in the given code snippet.') | |
# time.sleep(5) | |
# print('So the commands for the given being is:-') | |
# time.sleep(1) | |
# print('Cont') | |
# time.sleep(1) | |
# print('Continue') | |
# time.sleep(1) | |
# print('2') | |
# time.sleep(1) | |
# print('So here is our favorite part that is of stack overflow.') | |
# time.sleep(5) | |
# print('Yes, you guessed it right. The Ultimate recurring True loop.') | |
# time.sleep(1) | |
# print('The final boos.') | |
# time.sleep(2) | |
# print('So the commands for the given being is:-') | |
# time.sleep(1) | |
# print('Nothing') | |
# time.sleep(1) | |
# print('Empty') | |
# time.sleep(1) | |
# print('0') | |
# time.sleep(1) | |
# print('Blank') | |
# time.sleep(1) | |
# print('True loop.') | |
# time.sleep(1) | |
# print('True') | |
# time.sleep(1) | |
# Isn't there any more efficient way of actually inputting a sleep command before the statements? | |
# Maybe at the top of the mind, I can think of a way is by assigning it to the variable. | |
print('So input any of the given commands for any of the following to take place.') | |
ingest1 = input() | |
if ingest1 == 'Br': # One efficient method can be used is multiple continue and break statements. | |
while_loop() # Maybe...How to resolve this issue? | |
while_exp() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What exactly do you want to in it? Make a manual right?