diff options
| author | Paulo Custodio <pauloscustodio@gmail.com> | 2021-10-28 11:01:52 +0100 |
|---|---|---|
| committer | Paulo Custodio <pauloscustodio@gmail.com> | 2021-10-28 11:01:52 +0100 |
| commit | 7398636a001a651201da43feefcdf55340aa91bd (patch) | |
| tree | c8f6bda4ec2f53694e4aeaa4968d5f548164630a | |
| parent | ab2bc8f0e752be377a2bf6fd18432782e2542461 (diff) | |
| download | perlweeklychallenge-club-7398636a001a651201da43feefcdf55340aa91bd.tar.gz perlweeklychallenge-club-7398636a001a651201da43feefcdf55340aa91bd.tar.bz2 perlweeklychallenge-club-7398636a001a651201da43feefcdf55340aa91bd.zip | |
Add solutions to task 1 of challenge 124
23 files changed, 444 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore index 6f111fe0c2..ba8194b15c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ *.bak ch-1 ch-2 +ch_1 +ch_2 go.mod go.sum tags diff --git a/challenge-001/paulo-custodio/go.pl b/challenge-001/paulo-custodio/go.pl index 97670bc755..13ad914edd 100644 --- a/challenge-001/paulo-custodio/go.pl +++ b/challenge-001/paulo-custodio/go.pl @@ -7,7 +7,23 @@ use Path::Tiny; or die "Usage: ",path($0)->basename," nr\n"; my $nr = sprintf("%03d", $ARGV[0]); -for my $dir (qw( ada awk basic c cpp d forth lua perl python t )) { +for my $dir (qw( + ada + awk + basic + bc + brainfuck + c + cpp + d + forth + fortran + lua + pascal + perl + python + t + )) { path("challenge-$nr/paulo-custodio/$dir")->mkpath; } path("challenge-$nr/paulo-custodio/README")->spew("Solution by Paulo Custodio\n"); diff --git a/challenge-001/paulo-custodio/stats.pl b/challenge-001/paulo-custodio/stats.pl index 1cb928a96a..bc344a2db3 100644 --- a/challenge-001/paulo-custodio/stats.pl +++ b/challenge-001/paulo-custodio/stats.pl @@ -12,11 +12,14 @@ our %LANG = ( awk => 'awk', basic => 'bas', bc => 'bc', + brainfuck=>'bf', c => 'c', cpp => 'cpp', d => 'd', forth => 'fs', + fortran => 'f90', lua => 'lua', + pascal => 'pas', perl => 'pl', python => 'py', ); diff --git a/challenge-001/paulo-custodio/test.pl b/challenge-001/paulo-custodio/test.pl index 4e2418c4ae..c8dc2b9f75 100644 --- a/challenge-001/paulo-custodio/test.pl +++ b/challenge-001/paulo-custodio/test.pl @@ -17,7 +17,7 @@ our %LANG = ( awk => 'awk', basic => 'bas', bc => 'bc', - brainfuck=>'bfpp', + brainfuck=>'bf', c => 'c', cpp => 'cpp', d => 'd', @@ -137,15 +137,15 @@ sub build { return "gawk -f $prog --"; } if (/^basic$/) { - run("fbc $prog -o $prog_wo_ext") if (!-f $exe || -M $exe > -M $prog); + run("fbc $prog") if (!-f $exe || -M $exe > -M $prog); return $exe; } if (/^bc$/) { return "bc -lq $prog"; } if (/^brainfuck$/) { - run("perl bfpp.pl <$prog_wo_ext.bfpp >$prog_wo_ext.bf"); - return "brainfuck $prog_wo_ext.bf"; + #run("perl bfpp.pl <$prog_wo_ext.bfpp >$prog_wo_ext.bf"); + return "bf $prog_wo_ext.bf"; } if (/^c$/) { run("gcc $prog -o $prog_wo_ext -lmpfr -lgmp") if (!-f $exe || -M $exe > -M $prog); diff --git a/challenge-120/paulo-custodio/Makefile b/challenge-120/paulo-custodio/Makefile new file mode 100644 index 0000000000..2cbe39ae87 --- /dev/null +++ b/challenge-120/paulo-custodio/Makefile @@ -0,0 +1,5 @@ +all: brainfuck/ch-1.bf + perl ./test.pl + +brainfuck/ch-1.bf: brainfuck/ch-1.bfpp bfpp.pl + perl bfpp.pl < $< > $@ diff --git a/challenge-120/paulo-custodio/forth/ch-2.fs b/challenge-120/paulo-custodio/forth/ch-2.fs index 078dbfbc19..6728e3b202 100644 --- a/challenge-120/paulo-custodio/forth/ch-2.fs +++ b/challenge-120/paulo-custodio/forth/ch-2.fs @@ -40,25 +40,3 @@ DUP 180 > IF 360 SWAP - THEN ; NEXT-ARG parse_time clock_angle . CR BYE - -\ #include <stdio.h> -\ #include <stdlib.h> -\ #include <stdbool.h> -\ -\ -\ int clock_angle(int hh, int mm) { -\ int mm_angle = mm*360/60; -\ int hh_angle = (hh % 12)*360/12 + mm_angle/12; -\ int angle = abs(hh_angle - mm_angle); -\ if (angle > 180) { angle = 360 - angle; } -\ return angle; -\ } -\ -\ int main(int argc, char* argv[]) { -\ if (argc != 2) return EXIT_FAILURE; -\ int hh, mm; -\ if (!parse_time(argv[1], &hh, &mm)) return EXIT_FAILURE; -\ int angle = clock_angle(hh, mm); -\ printf("%d\n", angle); -\ } -\ diff --git a/challenge-124/paulo-custodio/Makefile b/challenge-124/paulo-custodio/Makefile new file mode 100644 index 0000000000..d2e3a9925f --- /dev/null +++ b/challenge-124/paulo-custodio/Makefile @@ -0,0 +1,5 @@ +all: brainfuck/ch-1.bf + perl ../../challenge-001/paulo-custodio/test.pl + +brainfuck/ch-1.bf: brainfuck/ch-1.pl + perl brainfuck/ch-1.pl > $@ diff --git a/challenge-124/paulo-custodio/ada/ch_1.adb b/challenge-124/paulo-custodio/ada/ch_1.adb new file mode 100644 index 0000000000..7ec0278e04 --- /dev/null +++ b/challenge-124/paulo-custodio/ada/ch_1.adb @@ -0,0 +1,28 @@ +-- TASK #1 > Happy Women Day +-- Submitted by: Mohammad S Anwar +-- Write a script to print the Venus Symbol, international gender +-- symbol for +-- women. Please feel free to use any character. + +with Ada.Text_IO; use Ada.Text_IO; + +procedure ch_1 is +begin + Put_Line(" ^^^^^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^ ^"); + Put_Line(" ^^^^^"); + Put_Line(" ^"); + Put_Line(" ^"); + Put_Line(" ^"); + Put_Line(" ^^^^^"); + Put_Line(" ^"); + Put_Line(" ^"); +end ch_1; diff --git a/challenge-124/paulo-custodio/awk/ch-1.awk b/challenge-124/paulo-custodio/awk/ch-1.awk new file mode 100644 index 0000000000..09c3c5f601 --- /dev/null +++ b/challenge-124/paulo-custodio/awk/ch-1.awk @@ -0,0 +1,26 @@ +#!/usr/bin/env gawk + +# TASK #1 > Happy Women Day +# Submitted by: Mohammad S Anwar +# Write a script to print the Venus Symbol, international gender symbol for +# women. Please feel free to use any character. + +BEGIN { + print " ^^^^^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^ ^" + print " ^^^^^" + print " ^" + print " ^" + print " ^" + print " ^^^^^" + print " ^" + print " ^" +} diff --git a/challenge-124/paulo-custodio/basic/ch-1.bas b/challenge-124/paulo-custodio/basic/ch-1.bas new file mode 100644 index 0000000000..86539c4cff --- /dev/null +++ b/challenge-124/paulo-custodio/basic/ch-1.bas @@ -0,0 +1,22 @@ +' TASK #1 > Happy Women Day +' Submitted by: Mohammad S Anwar +' Write a script to print the Venus Symbol, international gender symbol for +' women. Please feel free to use any character. + +print " ^^^^^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^ ^" +print " ^^^^^" +print " ^" +print " ^" +print " ^" +print " ^^^^^" +print " ^" +print " ^" diff --git a/challenge-124/paulo-custodio/bc/ch-1.bc b/challenge-124/paulo-custodio/bc/ch-1.bc new file mode 100644 index 0000000000..4242bd2443 --- /dev/null +++ b/challenge-124/paulo-custodio/bc/ch-1.bc @@ -0,0 +1,29 @@ +#!/usr/bin/bc -ql + +/* +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +*/ + +"\ + ^^^^^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^^^^^ + ^ + ^ + ^ + ^^^^^ + ^ + ^\ +" +quit diff --git a/challenge-124/paulo-custodio/brainfuck/ch-1.bf b/challenge-124/paulo-custodio/brainfuck/ch-1.bf new file mode 100644 index 0000000000..d2567a41cf --- /dev/null +++ b/challenge-124/paulo-custodio/brainfuck/ch-1.bf @@ -0,0 +1 @@ +[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.[-]++++++++++.
\ No newline at end of file diff --git a/challenge-124/paulo-custodio/brainfuck/ch-1.pl b/challenge-124/paulo-custodio/brainfuck/ch-1.pl new file mode 100644 index 0000000000..264e25c4fd --- /dev/null +++ b/challenge-124/paulo-custodio/brainfuck/ch-1.pl @@ -0,0 +1,36 @@ +#!/usr/bin/env perl + +# TASK #1 > Happy Women Day +# Submitted by: Mohammad S Anwar +# Write a script to print the Venus Symbol, international gender symbol for +# women. Please feel free to use any character. + +# Output brainfuck program + +use Modern::Perl; + +my $text = <<'END'; + ^^^^^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^^^^^ + ^ + ^ + ^ + ^^^^^ + ^ + ^ +END + +for (split //, $text) { + print "[-]"; # zero cell + print "+" x ord($_); # set cell to ASCII value of character + print "."; # output character +} diff --git a/challenge-124/paulo-custodio/c/ch-1.c b/challenge-124/paulo-custodio/c/ch-1.c new file mode 100644 index 0000000000..f88efc82bb --- /dev/null +++ b/challenge-124/paulo-custodio/c/ch-1.c @@ -0,0 +1,28 @@ +/* +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +*/ + +#include "stdio.h" + +int main() { + puts(" ^^^^^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^ ^"); + puts(" ^^^^^"); + puts(" ^"); + puts(" ^"); + puts(" ^"); + puts(" ^^^^^"); + puts(" ^"); + puts(" ^"); +} diff --git a/challenge-124/paulo-custodio/cpp/ch-1.cpp b/challenge-124/paulo-custodio/cpp/ch-1.cpp new file mode 100644 index 0000000000..988476fdfc --- /dev/null +++ b/challenge-124/paulo-custodio/cpp/ch-1.cpp @@ -0,0 +1,29 @@ +/* +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +*/ + +#include <iostream> +using namespace std; + +int main() { + cout << " ^^^^^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^ ^" << endl; + cout << " ^^^^^" << endl; + cout << " ^" << endl; + cout << " ^" << endl; + cout << " ^" << endl; + cout << " ^^^^^" << endl; + cout << " ^" << endl; + cout << " ^" << endl; +} diff --git a/challenge-124/paulo-custodio/d/ch_1.d b/challenge-124/paulo-custodio/d/ch_1.d new file mode 100644 index 0000000000..d9d5734676 --- /dev/null +++ b/challenge-124/paulo-custodio/d/ch_1.d @@ -0,0 +1,28 @@ +/* +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +*/ + +import std.stdio; + +void main() { + writeln(" ^^^^^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^ ^"); + writeln(" ^^^^^"); + writeln(" ^"); + writeln(" ^"); + writeln(" ^"); + writeln(" ^^^^^"); + writeln(" ^"); + writeln(" ^"); +} diff --git a/challenge-124/paulo-custodio/forth/ch-1.fs b/challenge-124/paulo-custodio/forth/ch-1.fs new file mode 100644 index 0000000000..1385d59b9e --- /dev/null +++ b/challenge-124/paulo-custodio/forth/ch-1.fs @@ -0,0 +1,28 @@ +#! /usr/bin/env gforth + +\ TASK #1 > Happy Women Day +\ Submitted by: Mohammad S Anwar +\ Write a script to print the Venus Symbol, international gender symbol for +\ women. Please feel free to use any character. + +: VENUS + ." ^^^^^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^ ^" CR + ." ^^^^^" CR + ." ^" CR + ." ^" CR + ." ^" CR + ." ^^^^^" CR + ." ^" CR + ." ^" CR +; + +VENUS BYE diff --git a/challenge-124/paulo-custodio/fortran/ch-1.f90 b/challenge-124/paulo-custodio/fortran/ch-1.f90 new file mode 100644 index 0000000000..8e5122303f --- /dev/null +++ b/challenge-124/paulo-custodio/fortran/ch-1.f90 @@ -0,0 +1,26 @@ +! TASK #1 > Happy Women Day +! Submitted by: Mohammad S Anwar +! Write a script to print the Venus Symbol, international gender symbol for +! women. Please feel free to use any character. + +program ch1 + implicit none + + print *, ' ^^^^^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^ ^' + print *, ' ^^^^^' + print *, ' ^' + print *, ' ^' + print *, ' ^' + print *, ' ^^^^^' + print *, ' ^' + print *, ' ^' +end program ch1 diff --git a/challenge-124/paulo-custodio/lua/ch-1.lua b/challenge-124/paulo-custodio/lua/ch-1.lua new file mode 100644 index 0000000000..663a2fd5c3 --- /dev/null +++ b/challenge-124/paulo-custodio/lua/ch-1.lua @@ -0,0 +1,26 @@ +#!/usr/bin/env lua + +--[[ +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +--]] + +io.write(" ^^^^^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^ ^\n") +io.write(" ^^^^^\n") +io.write(" ^\n") +io.write(" ^\n") +io.write(" ^\n") +io.write(" ^^^^^\n") +io.write(" ^\n") +io.write(" ^\n") diff --git a/challenge-124/paulo-custodio/pascal/ch-1.pas b/challenge-124/paulo-custodio/pascal/ch-1.pas new file mode 100644 index 0000000000..ae2ba8be09 --- /dev/null +++ b/challenge-124/paulo-custodio/pascal/ch-1.pas @@ -0,0 +1,27 @@ +(* +TASK #1 > Happy Women Day +Submitted by: Mohammad S Anwar +Write a script to print the Venus Symbol, international gender symbol for +women. Please feel free to use any character. +*) + +program ch2(input, output); +begin + WriteLn(' ^^^^^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^ ^'); + WriteLn(' ^^^^^'); + WriteLn(' ^'); + WriteLn(' ^'); + WriteLn(' ^'); + WriteLn(' ^^^^^'); + WriteLn(' ^'); + WriteLn(' ^'); +end. diff --git a/challenge-124/paulo-custodio/perl/ch-1.pl b/challenge-124/paulo-custodio/perl/ch-1.pl new file mode 100644 index 0000000000..2703d633cf --- /dev/null +++ b/challenge-124/paulo-custodio/perl/ch-1.pl @@ -0,0 +1,26 @@ +#!/usr/bin/env perl + +# TASK #1 > Happy Women Day +# Submitted by: Mohammad S Anwar +# Write a script to print the Venus Symbol, international gender symbol for +# women. Please feel free to use any character. + +print <<'END'; + ^^^^^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^^^^^ + ^ + ^ + ^ + ^^^^^ + ^ + ^ +END diff --git a/challenge-124/paulo-custodio/python/ch-1.py b/challenge-124/paulo-custodio/python/ch-1.py new file mode 100644 index 0000000000..cdc2e8c261 --- /dev/null +++ b/challenge-124/paulo-custodio/python/ch-1.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 + +# TASK #1 > Happy Women Day +# Submitted by: Mohammad S Anwar +# Write a script to print the Venus Symbol, international gender symbol for +# women. Please feel free to use any character. + +print("""\ + ^^^^^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^ ^ + ^^^^^ + ^ + ^ + ^ + ^^^^^ + ^ + ^\ +""") diff --git a/challenge-124/paulo-custodio/t/test-1.yaml b/challenge-124/paulo-custodio/t/test-1.yaml new file mode 100644 index 0000000000..cb6df79303 --- /dev/null +++ b/challenge-124/paulo-custodio/t/test-1.yaml @@ -0,0 +1,22 @@ +- setup: + cleanup: + args: + input: + output: | + | ^^^^^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^ ^ + | ^^^^^ + | ^ + | ^ + | ^ + | ^^^^^ + | ^ + | ^ |
