THIS IS AMAZING!
THIS IS AMAZING!
Congratulations
make a file with name ".replit", and type:
language="python"
run="python filename.py"
you can do things like:
#example.py
def main():
print('xD')
return 123
from example import main #You can import the file and use he functions
main() #write 'xD' in the terminal
x = main()
print(x) #write 123 in the terminal
C o o l
@PabloJuan Ah! De preferencia: você pode dar "import Aula4" e chamar uma função que tem nele.
@DannyIsCoding
me playing this game:
try to use the BASH, the bash language emulates a Ubuntu system, and you can use Images,Videos in he.
@Kookiez
C++ is more easy, C# is C++, but a little bit more different.
If you want go easy, C++, he can make amazing things with the #include <>
, look the windows.h for example.
If you want do programs more usefuls, with a beautiful language, use C#
Here, a Hello world with C++:
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}
readable
Now, a Hello World with C#:
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
It is not Java!
use Bash language and make you python file, write in the main.sh file "python pythonfilename.py", the bash emulates a Ubuntu computer(!).
C++ and Python, you can do Amazing things with Python, but with the C++ you can do the Universe.
"In express.js (since version 3) you should use that syntax:
var fs = require('fs');
var http = require('http');
var https = require('https');
var privateKey = fs.readFileSync('sslcert/server.key', 'utf8');
var certificate = fs.readFileSync('sslcert/server.crt', 'utf8');
var credentials = {key: privateKey, cert: certificate};
var express = require('express');
var app = express();
// your express configuration here
var httpServer = http.createServer(app);
var httpsServer = https.createServer(credentials, app);
httpServer.listen(8080);
httpsServer.listen(8443);
In that way you provide express middleware to the native http/https server
If you want your app running on ports below 1024, you will need to use sudo command (not recommended) or use a reverse proxy (e.g. nginx, haproxy)."
@Flyingcrabs
the function is a addtion function, he needs 2 arguments (the x
and the y
), the returns takes the "value to return" and put in a "var" (in my case, the x + y
)
Hi! You can use the def
to create functions, look:
def add(x,y):
return x + y
with this function you can do:
var = add(1,3)
Cat of the day and Pet of the day can help you.
nice
AaAaAAaA!
Its look like my Dog OS
edit: i gonna learn about OS and the Minix system.
WOW
Change the name to "OE Template" now xD
Olá Emilly! Bem-vinda ao repl.it! Ao digitar uma string, retorna um erro, para evitar coisas como essa você pode usar Except, que no contexto, seria algo como:
x = input('Digite um número:\n')
while(true):
try:
float(x)
break
except ValueError:
x = input('Digite um NÚMERO:\n')
EDIT: bruh, se estou lembrado, você pode usar int(x)
para converter uma string para número, tipo:
x = "123"
int(x) #Retornaria literalmente 123
You need learn Assembly and C/C++ to make a OS.
For you happy, here is some links to help you:
http://www.linuxfromscratch.org/,
https://www.fergonez.net/files/tut_sistoper.pdf,
http://menuetos.net/docs.htm,
https://rufus.ie/
xD
You can use the random dog website to get some dog photos,
And the 1998 website... Dog of the day.
Novamente, estou respondendo algo "antigo", mas oque quer dizer com isso?
@finleyparr
bin(int(x)).split('0b')[1]
@Highwayman What would the code look like? (I am a beginner)
eu acho que já é tarde demais, mas aqui está: Crie um arquivo chamado ".replit", e nele coloque 'language = "python"', e embaixo 'run = "python Aula4.py"'.Aqui está um exemplo (que não funciona por causa do "All" xD)