Old
# Introduction Hello guys! I am Techsplosion.Do
Not
Open
This
I
Swear
There
Is
Nothing
Here
S
t
o
p
I
t
A
l
r
e
a
d
y
You can access my YouTube channel at [here](https://www.youtube.com/channel/UCzbYYyFvd5lXhEK_EdnPkTw). I have 200 or so (as of now) subscribers. If you subscribe to me, that would mean a lot. But you don't have to!print("Hello world!")
Simple Modulo with User Input (is done with dividing by 2 and the % icon for modulo, the remainder can be 0
or 1
and is outputted)
i = int(input("Enter a whole number to see the remainder: "))
print(i % 2)
def start_end(func):
def wrapper_se(*args, **kwargs):
print("Started.")
func(*args, **kwargs)
print("Ended.")
return
return wrapper_se
@start_end
def print_hi():
print("Hi!")
print_hi()
Started.
Hi!
Ended.
def print_hi():
print("Hi!")
def print_hi_in(inprefix: str):
inputu = input(inprefix)
print(f"Hi, {inputu}!")
import somepackage
from somepackage import other
somepackage.print_hi()
other.printh_hi_in("Enter your name: ")
Test the files and see the output.
pip install discord
from discord.ext import commands
from math import sqrt
botclient = commands.Bot(command_prefix="mb!")
botclient.remove_command('help')
TOKEN = 'YOUR-TOKEN-HERE'
@botclient.event
async def on_ready():
print(f"{botclient.user.name} is ready.")
@botclient.command(aliases=["add"])
async def addition(ctx, num1: float, num2: float):
await ctx.send(str(num1-num2))
@botclient.command(aliases=["subtract"])
async def subtraction(ctx, num1: float, num2: float):
await ctx.send(str(num1-num2))
@botclient.command(aliases=["multiply"])
async def multiplication(ctx, num1: float, num2: float):
await ctx.send(str(num1*num2))
@botclient.command(aliases=["divide"])
async def division(ctx, num1: float, num2: float):
await ctx.send(str(num1/num2))
@botclient.command(aliases=["sqrt"])
async def squareroot(ctx, number: float):
await ctx.send(str(sqrt(number))
@botclient.command(aliases=["cbrt"])
async def cuberoot(ctx, number: float):
await ctx.send(str(sqrt(number / 3)))
botclient.run(TOKEN)
I have basic idea about C++.
include <iostream>
using namespace std;
int main() {
cout << "Hello world!" << endl;
}
Simple Modulo with User Input (is done with dividing by 2 and the % icon for modulo, the remainder can be 0
or 1
and is outputted)
include <iostream>
include <string>
using namespace std;
int main() {
int modulo;
string prompt = "";
cout << prompt << endl;
cin >> modulo;
cout << modulo % 2 << endl;
}