Skip to main content

Posts

URI Problem 2756 Solution Output 10 - URI Online Judge Solution

URI Online Judge Solution 2756 Output 10 Using Python Programming Language.  Your programming teacher would like you to do a program with the following characteristics:  Put seven blanks and put the 'A' character;  Put six blanks and place the character 'B', a space and the character 'B';  Put five blanks and place the 'C' character, three white space, and the 'C' character;  Put four blanks and place the 'D' character, five white space, and the 'D' character;  Put three blanks and put the 'E' character, seven white space and the 'E' character;  Repeat procedure 4;  Repeat procedure 3;  Repeat procedure 2;  Repeat procedure 1.  Input   There is not.  Output   The result of your program should be written according to the output example. Input Sample Output Sample A B B C C D D E E D D C C B B A   URI 2756 Solution in Python: print(" A...

URI Problem 2753 Solution Output 7 - URI Online Judge Solution

URI Online Judge Solution 2753 Output 7 Using Python Programming Language.   Your teacher would like you to do a program with the following characteristics:  Create twenty-six integers;  Assign the first variable the value 97;  Assign the other variables to the value of the first sum of a unit;  Show on the screen the numeric values of the first variable, a space in arm, the character 'e', another white space and its alphanumeric value (characters);  Repeat for all other variables.  Input  There is not.  Output  The result of your program should be the same as the output example. Input Sample Output Sample 97 e a 98 e b 99 e c 100 e d 101 e e 102 e f 103 e g 104 e h 105 e i 106 e j 107 e k 108 e l 109 e m 110 e n 111 e o 112 e p 113 e q 114 e r 115 e s 116 e t 117 e u 118 e v 119 e w 120 e x 121 e y 122 e z URI 2753 Solution in Python: print("97 e a") print("98 e b") print("99 e c") print("100 e d") print("101 e e") print(...

URI Problem 2748 Solution Output 2 - URI Online Judge Solution

URI Online Judge Solution 2748 Output 2 Using Python Programming Language.  Your teacher would like to make a screen with the following characteristics:  Have 39 dashes (-) on the first line;  Have a | underneath the first dash and the thirty-ninth dash of the first line, below the dash should begin to write the word "Roberto" and the rest fill in the middle with white space;  Have a | below the first dash and the thirty-ninth dash of the first line, fill in the middle with whitespace;  Have a | below the first dash and the thirty-ninth dash of the first line, below the 10 dash you should begin to type the number "5786" and the rest fill in the middle with whitespace;  Repeat procedure 3;  Have a | underneath the first dash and the thirty-ninth dash of the first line, below the dash 10 should begin to write the word "UNIFEI" and the rest fill in the middle with white space;  Repeat procedure 1.    At the end should look like the followin...

URI Problem 2747 Solution Output 1 - URI Online Judge Solution

URI Online Judge Solution 2747 Output 1 Using Python Programming Language.  Your programming teacher would like to make a screen with the following characteristics:  Have 39 dashes (-) on the first line;  Have a | below the first dash and the thirty-ninth dash of the first line, fill in the middle with whitespace;  Repeat procedure 2 plus four times;  Repeat procedure 1.  At the end should look like the following image:  --------------------------------------- (39 traces) | | | | | | | | | | --------------------------------------- (39 traces) Input   There is no.  Output  The output will be printed as shown above. Input Sample Output Sample --------------------------------------- | | | | | ...

URI Problem 2746 Solution Viruses - URI Online Judge Solution

URI Online Judge Solution 2746 Viruses Using PostgreSQL Query Language.   Viruses are evolving, but new research has proven that by switching some proteins the vaccine becomes unbeatable. The protein H1(Hemagglutinin) when replaced by the X protein (Xenomorphina) has interesting effects against almost every viral disease. Some conspiracists say that after the vaccine’s discovery some strange 3 meters tall creatures were found in the surroundings of the laboratories, but this is clearly a lie.  Therefore, you must replace every string “H1”( Hemagglutinin ) by 'X' ( Xenomorphina ). Schema virus Column Type id (PK) integer name varchar Tables virus id name 1 H1RT 2 H7H1 3 HUN8 4 XH1HX 5 XXXX Output Sample name XRT H7X HUN8 XXHX XXXX    URI 2746 Solution in PostgreSQL: SELECT REPLACE(name,'H1','X')as "name" FROM VIRUS;

URI Problem 2745 Solution Taxes - URI Online Judge Solution

URI Online Judge Solution 2745 Taxes Using PostgreSQL Query Language.   You are going to the International Personal Tax meeting and your proposal is: every individual with income higher than 3000 must pay a tax to the government, which is 10% of his/her income.  Show the name and the tax value of each person who earns more than 3000, with two decimal places of precision. Schema people Column Type id (PK) integer name varchar salary numeric Tables people id name salary 1 James M. Tabarez 883 2 Rafael T. Hendon 4281 3 Linda J. Gardner 4437 4 Nicholas J. Conn 8011 5 Karol A. Morales 2508 6 Lolita S. Graves 8709 Output Sample name tax Rafael T. Hendon 428.10 Linda J. Gardner 443.70 Nicholas J. Conn 801.10 Lolita S. Graves 870.90   URI 2745 Solution in PostgreSQL: SELECT name,ROUND((salary*10)/100,2) AS tax FROM people WHERE salary>3000

URI Problem 2744 Solution Passwords - URI Online Judge Solution

URI Online Judge Solution 2744 Passwords Using PostgreSQL Query Language.  You were hired to be the consultant for a company. Analyzing the database, you noticed that the passwords are stored as text files and, as everyone knows, this is a terrible security practice as they are not encrypted.  Therefore you must convert every password to the MD5 format. Show the client id, the password before conversion and the new MD5. Schema account Column Type id (PK) integer name varchar login varchar password varchar Tables account id name login password 1 Joyce P. Parry Promeraw noh1Oozei 2 Michael T. Gonzalez Phers1942 Iath3see9bi 3 Heather W. Lawless Hankicht diShono4 4 Otis C. Hitt Conalothe zooFohH7w 5 Roger N. Brownfield Worseente fah7ohNg Output Sample id password MD5 1 noh1Oozei b67ed42ced0e0a19ce7ed904bb94b607 2 Iath3see9bi 66877b2da87fb09af3f5602f31c6d35c 3 diShono4 d19c9be4c00c683a4688948b81eb2a1d 4 zooFohH7w 202b76ed4a556fdbf409505a8023695e 5 fah7ohNg 05b3dccaa70f228f1bedc7a28...