+ 1

How to make a python code organized like the c++ codes ?

4th Jun 2020, 7:18 AM
Adnan Al-Khateeb
Adnan Al-Khateeb - avatar
5 Respostas
+ 1
Blank space is not interpreted as anything so you can leave neat gaps and paragraph your work. Use comments to explain the steps above each. And use functions so your main doesn't look overloaded.
4th Jun 2020, 8:39 AM
Olivia
Olivia - avatar
+ 1
a = int(input("Enter a number: ")) print(a)
10th Feb 2021, 10:26 AM
Olivia
Olivia - avatar
0
like this in c++ every line is clear to read very simple #include <iostream> using namespace std ; int main () { int a; cout << "enter any number :" <<endl; cin >> a; cout << a; } but in python with the same code it's complicated to read
4th Jun 2020, 7:26 AM
Adnan Al-Khateeb
Adnan Al-Khateeb - avatar