# uncompyle6 version 3.9.0
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
# Embedded file name: Eulersjudgementedgambling.py
# Compiled at: 2023-02-11 20:57:53
import base64, sys
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.fernet import Fernet
password = 'iitgoanewiit'
salt = b"\x9f\xd8'\x9d\x92\xd1\x06\x95}\xda\xaf\xf5\xda\x8d\xd9\xd1m"
kdf = PBKDF2HMAC(algorithm=hashes.SHA256, length=32, salt=salt, iterations=100000, backend=default_backend())
key = base64.urlsafe_b64encode(kdf.derive(password))

def xor_cipher(input_data, key):
    output_data = []
    for i, char in enumerate(input_data):
        xor_result = ord(char) ^ ord(key[i % len(key)])
        output_data.append(chr(xor_result))

    return ('').join(output_data)


input_data = 'This is some data that needs to be encrypted.'
encrypted_data = xor_cipher(input_data, key)
print encrypted_data
print 'Multiple universes have been hypothesized in cosmology, physics, astronomy, religion, philosophy, transpersonal psychology, music, and all kinds of literature, particularly in science fiction, comic books and fantasy. In these contexts, parallel universes are also called alternate universes quantum universes interpenetrating dimensions'
haldor = 'with open("script.py", "rb") as f:    <newline> data = f.read()'
print 'What are the implications of a multiverse on our understanding of physics and cosmology? '
implication = input()
print 'You said: ' + implication
prove = input('Do you think it is possible to ever prove or disprove the existence of a multiverse? (yes/no)')
if prove == 'yes':
    print 'What evidence or methods do you think could be used to prove or disprove a multiverse?'
elif prove == 'no':
    print 'Why do you think it is not possible to prove or disprove the existence of a multiverse?'
else:
    print "Invalid answer, please enter 'yes' or 'no'."
proof = input()
print 'You said: ' + proof

def vigenere_cipher(input_data, key, decrypt=False):
    output_data = []
    haldor2 = '#fernet = Fernet(key) <newline> encrypted = fernet.encrypt(data)'
    for i, char in enumerate(input_data):
        shift = ord(key[i % len(key)])
        if decrypt:
            shift = -shift
        output_data.append(chr((ord(char) + shift) % 128))


input_file = 'This is some data that needs to be encrypted.'
encrypted_file = vigenere_cipher(input_file, key)
print encrypted_file

def text_to_binary(input_date):
    binary_data = []
    haldor3 = '#with open("newscript.py", "wb") as f:   <newline> f.write(encrypted)'
    for char in input_data:
        binary_data.append(format(ord(char), '08b'))

    return ('').join(binary_data)


input_date = 'According to some, the idea of infinite worlds was first suggested by the pre-Socratic Greek philosopher Anaximander in the sixth century BCE.[1] However, there is debate as to whether he believed in multiple worlds, and if he did, whether those worlds were co-existent or successive.[2][3][4][5] The first to whom we can definitively attribute the concept of innumerable worlds are the Ancient Greek Atomists, beginning with Leucippus and Democritus in the 5th century BCE, followed by Epicurus (341-270 BCE) and Lucretius (1st century BCE).[6][7][5][8][9][10] In the third century '
binary_data = text_to_binary(input_date)
print binary_data

def text_to_hex(input_dat):
    hex_data = []
    haldor4 = '#with open("newscript.py", "rb") as f:  <newline>   encrypted = f.read()'
    for char in input_data:
        hex_data.append(format(ord(char), '02x'))

    return ('').join(hex_data)


input_dat = 'According to some, the idea of infinite worlds was first suggested by the pre-Socratic Greek philosopher Anaximander in the sixth century BCE.[1] However, there is debate as to whether he believed in multiple worlds, and if he did, whether those worlds were co-existent or successive.[2][3][4][5] The first to whom we can definitively attribute the concept of innumerable worlds are the Ancient Greek Atomists, beginning with Leucippus and Democritus in the 5th century BCE, followed by Epicurus (341-270 BCE) and Lucretius (1st century BCE).[6][7][5][8][9][10] In the third century BCE, the philosopher Chrysippus suggested that the world eternally expired and regenerated, effectively suggesting the existence of multiple universes across time.[9] The concept of multiple universes became more defined in the Middle Ages.'
hex_data = text_to_hex(input_dat)
print hex_dat
print 'Some physicists say the multiverse is not a legitimate topic of scientific inquiry.'
# okay decompiling Eulersjudgementedgambling.pyc 

Python Online Compiler

Write, Run & Share Python code online using OneCompiler's Python online compiler for free. It's one of the robust, feature-rich online compilers for python language, supporting both the versions which are Python 3 and Python 2.7. Getting started with the OneCompiler's Python editor is easy and fast. The editor shows sample boilerplate code when you choose language as Python or Python2 and start coding.

Taking inputs (stdin)

OneCompiler's python online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample python program which takes name as input and print your name with hello.

import sys
name = sys.stdin.readline()
print("Hello "+ name)

About Python

Python is a very popular general-purpose programming language which was created by Guido van Rossum, and released in 1991. It is very popular for web development and you can build almost anything like mobile apps, web apps, tools, data analytics, machine learning etc. It is designed to be simple and easy like english language. It's is highly productive and efficient making it a very popular language.

Tutorial & Syntax help

Loops

1. If-Else:

When ever you want to perform a set of operations based on a condition IF-ELSE is used.

if conditional-expression
    #code
elif conditional-expression
    #code
else:
    #code

Note:

Indentation is very important in Python, make sure the indentation is followed correctly

2. For:

For loop is used to iterate over arrays(list, tuple, set, dictionary) or strings.

Example:

mylist=("Iphone","Pixel","Samsung")
for i in mylist:
    print(i)

3. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while condition  
    #code 

Collections

There are four types of collections in Python.

1. List:

List is a collection which is ordered and can be changed. Lists are specified in square brackets.

Example:

mylist=["iPhone","Pixel","Samsung"]
print(mylist)

2. Tuple:

Tuple is a collection which is ordered and can not be changed. Tuples are specified in round brackets.

Example:

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)

Below throws an error if you assign another value to tuple again.

myTuple=("iPhone","Pixel","Samsung")
print(myTuple)
myTuple[1]="onePlus"
print(myTuple)

3. Set:

Set is a collection which is unordered and unindexed. Sets are specified in curly brackets.

Example:

myset = {"iPhone","Pixel","Samsung"}
print(myset)

4. Dictionary:

Dictionary is a collection of key value pairs which is unordered, can be changed, and indexed. They are written in curly brackets with key - value pairs.

Example:

mydict = {
    "brand" :"iPhone",
    "model": "iPhone 11"
}
print(mydict)

Supported Libraries

Following are the libraries supported by OneCompiler's Python compiler

NameDescription
NumPyNumPy python library helps users to work on arrays with ease
SciPySciPy is a scientific computation library which depends on NumPy for convenient and fast N-dimensional array manipulation
SKLearn/Scikit-learnScikit-learn or Scikit-learn is the most useful library for machine learning in Python
PandasPandas is the most efficient Python library for data manipulation and analysis
DOcplexDOcplex is IBM Decision Optimization CPLEX Modeling for Python, is a library composed of Mathematical Programming Modeling and Constraint Programming Modeling