Module 4: Load a grid (part 1)

This commit is contained in:
David Doblas Jiménez 2021-07-12 19:49:40 +02:00
parent b3a49d7991
commit 381984bfbc
2 changed files with 21 additions and 2 deletions

12
a.c
View File

@ -1,4 +1,5 @@
#include <iostream> // library for printing
#include <string> // support for strings
using namespace std;
// For compiling C++ code
@ -6,5 +7,14 @@ using namespace std;
int main() {
cout << 1 + 1 << "\n";
string s0 = "DOG....";
string s1 = "---....";
string s2 = "----...";
string s3 = "-------";
string s4 = "...----";
string s5 = "....---";
string s6 = "....CAT";
s0.append("EXTRA!!");
cout << "s0 is now: " << s0 << "\n";
}

11
a.py
View File

@ -1,2 +1,11 @@
if __name__ == "__main__":
print(1+1)
s0 = "DOG...."
s1 = "---...."
s2 = "----..."
s3 = "-------"
s4 = "...----"
s5 = "....---"
s6 = "....CAT"
s0 += "EXTRA!!"
print(s0)