Find Jobs
Hire Freelancers

Python Questions - Need Solutions in Python

₹600-1500 INR

Завершено
Опублікований over 1 year ago

₹600-1500 INR

Оплачується при отриманні
Q1. We are building a word processor and we would like to implement a "word-wrap" functionality. Given a list of words followed by a maximum number of characters in a line, return a collection of strings where each string element represents a line that contains as many words as possible, with the words in each line being concatenated with a single '-' (representing a space, but easier to see for testing). The length of each string must not exceed the maximum character length per line. Your function should take in the maximum characters per line and return a data structure representing all lines in the indicated max length. Examples: words1 = [ "The", "day", "began", "as", "still", "as", "the", "night", "abruptly", "lighted", "with", "brilliant", "flame" ] wrapLines(words1, 13) "wrap words1 to line length 13" => [ "The-day-began", "as-still-as", "the-night", "abruptly", "lighted-with", "brilliant", "flame" ] wrapLines(words1, 20) "wrap words1 to line length 20" => [ "The-day-began-as", "still-as-the-night", "abruptly-lighted", "with-brilliant-flame" ] words2 = [ "Hello" ] wrapLines(words2, 5) "wrap words2 to line length 5" => [ "Hello" ] words3 = [ "Hello", "world" ] wrapLines(words3, 5) "wrap words3 to line length 5" => [ "Hello", "world" ] words4 = ["Well", "Hello", "world" ] wrapLines(words4, 5) "wrap words4 to line length 5" => [ "Well", "Hello", "world" ] words5 = ["Hello", "HelloWorld", "Hello", "Hello"] wrapLines(words5, 20) "wrap words 5 to line length 20 => [ "Hello-HelloWorld", "Hello-Hello" ] All Test Cases: words, max line length wrapLines(words1, 13) wrapLines(words1, 20) wrapLines(words2, 5) wrapLines(words3, 5) wrapLines(words4, 5) wrapLines(words5, 20) n = number of words OR total characters Q2. We are building a word processor and we would like to implement a "reflow" functionality that also applies full justification to the text. Given an array containing lines of text and a new maximum width, re-flow the text to fit the new width. Each line should have the exact specified width. If any line is too short, insert '-' (as stand-ins for spaces) between words as equally as possible until it fits. Note: we are using '-' instead of spaces between words to make testing and visual verification of the results easier. lines = [ "The day began as still as the", "night abruptly lighted with", "brilliant flame" ] reflowAndJustify(lines, 24) "reflow lines and justify to length 24" => [ "The--day--began-as-still", "as--the--night--abruptly", "lighted--with--brilliant", "flame" ] // <--- a single word on a line is not padded with spaces reflowAndJustify(lines, 25) "reflow lines and justify to length 25" => [ "The-day-began-as-still-as" "the-----night----abruptly" "lighted---with--brilliant" "flame" ] reflowAndJustify(lines, 26) "reflow lines and justify to length 26" => [ "The--day-began-as-still-as", "the-night-abruptly-lighted", "with----brilliant----flame" ] reflowAndJustify(lines, 40) "reflow lines and justify to length 40" => [ "The--day--began--as--still--as-the-night", "abruptly--lighted--with--brilliant-flame" ] reflowAndJustify(lines, 14) "reflow lines and justify to length 14" => ['The--day-began', 'as---still--as', 'the------night', 'abruptly', 'lighted---with', 'brilliant', 'flame'] All Test Cases: lines, reflow width reflowAndJustify(lines, 24) reflowAndJustify(lines, 25) reflowAndJustify(lines, 26) reflowAndJustify(lines, 40) reflowAndJustify(lines, 14) n = number of words OR total characters
ID проекту: 34321224

Про проект

7 пропозицій(-ї)
Дистанційний проект
Активність 2 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
Hi there! I am Professional in Scraping Data , Data Entry Operator and Python expert in since 2 years.I have gone through your outsourced requirement and have analyzed that I have right credentials To do this job properly with better performence I am sure 100% that I can do your project as you required . I want to point that I have enough experience to do this task to the fullest in order to prove my skills and abilities in this field and of course, to help you complete this work as required, I am ready to start right now. contact me for better communication. Thank you
₹1 200 INR за 7 дні(-в)
5,0 (3 відгуки(-ів))
2,7
2,7
Аватарка користувача
Hi, I hope you are doing great. I saw your two questions. I can help with implement both of these as I have multiple years of experience with python programming and I can start immediately if you want to and can deliver in 1-2 hours max. Regards
₹1 000 INR за 1 день
5,0 (5 відгуки(-ів))
3,8
3,8
7 фрілансерів(-и) готові виконати цю роботу у середньому за ₹2 021 INR
Аватарка користувача
I am Ring. I am about 19+ years experienced in GNU/Linux based system, server installation and customization, develop, deploy, security and support. I may help you in this regard.
₹3 500 INR за 1 день
4,9 (11 відгуки(-ів))
3,9
3,9
Аватарка користувача
Hello I have read the questions and i can provide the solutions for you with details comments explaining each part of the code
₹5 000 INR за 7 дні(-в)
4,9 (19 відгуки(-ів))
3,8
3,8
Аватарка користувача
I'll do your task within a few hours without any mistakes and problems. The bid amount and some questions may be discussed in a private chat.
₹900 INR за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Hi there! I just checked the two questions and I'll be glad to provide you with a detailed solution. I am a software engineer with 5+ years of experience in python and solving problems in this language became pretty intuitive to me thanks to the massive problem solving I've been doing for fun. Please award me the project so that we can discuss it more.
₹1 050 INR за 7 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор INDIA
DEWAS, India
5,0
1
Спосіб оплати верифіковано
На сайті з трав. 29, 2016

Верифікація клієнта

Інші роботи від цього клієнта

Predictive Analytics- IMDB Movies , Classical Machine Learning
₹1500-12500 INR
Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.