Write a ruby program that reads a line from the user

Assignment Help Computer Engineering
Reference no: EM13332012

• Lecture 13 (02/26)

? In class assignments #12. Design a Ruby class that inherits from the inbuilt String class and adds an additional functionality to check if the string is a palindrome. Email your code by end of day 02/28.

• Lecture 12 (02/21)

? In class assignments #11. Design a Ruby class to process weather data from NCDC as discussed in class. You should be able to set a particular year and find the maximum temperature in that year. Email your code by end of day 02/26.

• Lecture 11 (02/19)

? In class assignments #10. Design a Ruby class to set and get a single line of text, check for substring, get the length and concatenate with another input string. Email your code by end of day 02/21.

• Lecture 10 (02/14)

? In class assignments #9. Each file in the folder 1951 is associated with a particular weather station. For example, the file 010230-99999-1951 contains recordings (multiple recordings per day) from the weather station id 010230 for the whole year of 1951. Similarly other files for other weather stations. Write a Ruby program that merges all the files in the folder into a single new file called "1951-recordings". You can place all the records from a particular weather station followed by all the records of another station and so on. Then compute the average global temperature for the year 1951. (Remember that the measurements were made at multiple times per day!) Use your regular team for this assignment. Submit your code by end of day 02/19 by email.

• Lecture 9 (02/12)

? In class assignments #7 and #8. Assignment #7: Complete previous assignment without number of players assumed ahead of time. Assignment #8: Compute the highest temperature in the years 1901 and 1902. (The data is here. Format information is available here.) Email your code for the two assignments (separately) by end of day 02/14.

• Lecture 8 (02/07)

? In class assignment #6. Build on the previous assignment to write a function to compute a tournament winner with 2^n number of players.

• Lecture 7 (02/05)

? In class assignment #5. Write a Ruby function that takes as input an array modeling a simple rock-paper-scissors game and returns the winning's players name. For example, if the input to the function is the array [["Alice", "Rock"], ["Bob", "Paper"]], the function should return the string "Paper". Name your file <lastName>.rb and email your code by identifying your team members by end of day 02/06.

• Lecture 6 (01/31)
? In class assignment #4. Write a Ruby function that takes as input an array of strings, groups them into anagrams and returns an array of anagram arrays. For example, if the input to your function is ["god", "dog", "no", "on", "google", "yahoo"] then the return value should be [["god", "dog"], ["no", "on"], ["google"], ["yahoo"]]. Write a Ruby program to demonstrate that the function works. Name your file as<lastName>.rb and email by end of day 02/01.

• Topics covered: Array operations in Ruby.
• Lecture 5 (01/29).
? Assignment #3. Write a Ruby program that reads a line from the user and checks if the line is a palindrome. You should ignore case and punctuation characters in deciding if the input is a palindrome. For example, "A man, a plan, a canal - Panama" is a palindrome. See other examples here. Assignment #2 posted. (See lecture 4 below.)

Topics covered: intro to Ruby: programming exercise.

Reference no: EM13332012

Questions Cloud

What is the pans distance from the ceiling : A massless pan hangs from a spring that is suspended from the ceiling. What is the pan's distance from the ceiling when the spring reaches its maximum length
What steps are required to convert sampson pty ltd : Discuss the implications if the directors of Sampson Pty Ltd sign a contract to develop commercial properties and advise Sam of any liability arising from his sale of the business to the company.
Evaluate the shortest period of rotation : The fastest possible rate of rotation of a planet is that for which the gravitational force on material at the equator barely provides the centripetal force needed for the rotation. evaluate the shortest period of rotation
What is the new water level and motion commented : A graduated cylinder contains 155 mL of water . A 15.0-g piece of iron (density = 7.86g/cm^3) and a 20.0-g piece of lead (density = 11.3 g/cm^3) are added. What is the new water level, in milliliters, in the cylinder? motion commented
Write a ruby program that reads a line from the user : In class assignments #12. Design a Ruby class that inherits from the inbuilt String class and adds an additional functionality to check if the string is a palindrome. Email your code by end of day 02/28.
What is the induced emf in one of the windings : A solenoid of length 4.5 cm and diameter 0.85 cm is wound with 181 turns per cm. The current is decreasing at a rate of 36.6 A/s. What is the induced emf in one of the windings
How much current is flowing through the wire : The magnitude of a magnetic field a distance 0.0001 m from a wire is 11.0*10^4 T. How much current is flowing through the wire
Find the cars rotational energy : A car with a total mass of 1.43 103 kg has wheels of radius 29.0 cm and moment of inertia 0.885 kg · m2. Find the car's rotational energy when the car is moving at a speed of 22.0 m/s
Calculate the case mix index for the hospitals : Calculate the case mix index for the hospitals, which use the same patient classification system and create a benchmark for future years and to be able to compare performance to similar peer practices

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd