Loading...

Във форума е въведено ограничение, което позволява на потребителите единствено да разглеждат публикуваните въпроси.

evailieva avatar evailieva 6 Точки

[Homework] C# Basics - "Математика за програмисти" - Преправка на домашното

Здравейте!Днес след първият ден от курса ни дадоха домашно,опитах се да го реша дали някой е получил същите отговори или нещо бъркам 

Problem 1 Some Primes

24th-89

101st-547

251st-1597

Problem 2 Some Fibonacci Primes

89-12 място в таблицата на Fibonacci

547-няма го в таблицата

1597-18 място

Дали има нещо вярно?Благодаря предварително :) Лека вечер!

Тагове:
5
Programming Basics
DimiturJeliazkov avatar DimiturJeliazkov 25 Точки

Това е моето домашно дано е от полза за някои. :)

 

Homework: Math for Developers

This document defines homework assignments from the “C# HYPERLINK "http://softuni.bg/courses/csharp-basics/"BasicsHYPERLINK "http://softuni.bg/courses/csharp-basics/"“ Course @ Software University. Please submit as homework a single txt/doc/docx file holding the answers of all below described problems.

  • Some Primes

Find the 24th, 101st and 251st prime number.

Answer : 24th - 89

101st - 547

251st - 1597

Resources:

http://www.bigprimes.net/archive/prime/1/

  • Some Fibonacci Primes

Check if the 24th, 101st and 251st prime numbers are part of the base Fibonacci number set. What is their position?

Answer : 24th - 89 - is a Fibonacci number - 11 place

101st - 547 - is a not Fibonacci number

251st - 1597 - is a Fibonacci number -17 place


 

  • Some Factorials

Find 100!, 171! and 250! Give all digits.

Answer:

100! - 9.3326215443944152681699238856267e+157 =93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000

171! - 1.2410180702176678234248405241031e+309 = 1241018070217667823424840524103103992616605577501693185388951803611996075221691752992751978120487585576464959501670387052809889858690710767331242032218484364310473577889968548278290754541561964852153468318044293239598173696899657235903947616152278558180061176365108428800000000000000000000000000000000000000000

250! - 3.2328562609091077323208145520244e+492 = 3232856260909107732320814552024368470994843717673780666747942427112823747555111209488817915371028199450928507353189432926730931712808990822791030279071281921676527240189264733218041186261006832925365133678939089569935713530175040513178760077247933065402339006164825552248819436572586057399222641254832982204849137721776650641276858807153128978777672951913990844377478702589172973255150283241787320658188482062478582659808848825548800000000000000000000000000000000000000000000000000000000000000

Resources:

http://www.calculatorsoup.com/calculators/discretemathematics/factorials.php

  • Calculate Hypotenuse

You are given three right angled triangles. Find the length of their hypotenuses.

  • Catheti: 3 and 4 Answer: 5

  • Catheti: 10 and 12 Answer: 15.6204993518133

  • Catheti 100 and 250 Answer: 269.258240356725

  • Numeral System Conversions

Convert 1234d to binary and hexadecimal numeral systems.

Convert 1100101b to decimal and hexadecimal numeral systems.

Convert ABChex to decimal and binary numeral systems.

Answer: 1234d = 10011010010b = 4D2hex

1100101b = 65hex = 101d

ABChex = 2748d = 101010111100b

  • Least Common Multiple

Find LCM(1234, 3456).

Answer:

For the values: 3456, 1234

The LCM is: 2132352

Resources:

http://www.calculatorsoup.com/calculators/math/lcm.php


 

13
14/06/2015 14:56:20
Lamms avatar Lamms 197 Точки

Здравей, 

на втора задача си пропуснал да напишеш и кой им е номерът в редицата на Фибоначи.

3
DimiturJeliazkov avatar DimiturJeliazkov 25 Точки

Сложи го в архив. Под бутона Избор на файл пише позволените формати zip, rar, 7z

 

Edit: Голяма модераторска активност изтриха на човека логичния въпрос :)

 
 
 
3
14/06/2015 15:51:49
Eltimir avatar Eltimir 0 Точки

Не го изтриха те , а аз,  иначе Благодаря за отговора, прочетох  защо не ми позволяваше и го поправих :)

0
bogomilsimeonov91 avatar bogomilsimeonov91 2 Точки

Здравей колега!

Бих желал да ти благодаря за източниците а именно за калкулаторите които си споделил определено от този за Задача 3 - Факториали , които са в интернет този дава до последна цифра, а не съкратено както останалите.

 

С уважение,

Богомил Симеонов

2
nikola.ninov avatar nikola.ninov 4 Точки

Добър сайт за изчисления https://www.wolframalpha.com/ мисля, че помага и при интеграли но само с отговор laugh

2
tal4eto+deleted! avatar tal4eto+deleted! 23 Точки

Здравейте, това е част от моето домашно. Опитах се да съм максимално подробна в решенията и обясненията. Дано да e разбираемо, ако имате съвети и препоръки за по-доброто му написване, моля ви да споделите. Копирам само задачите, на които съм давала обяснения. Колегата @ DimiturJeliazkov е дал всичко останало много подорбно и ясно. 

 

Problem 5. Numeral System Conversions: Convert:

  1. 1234d to binary and hexadecimals numeral systems.
  2. 1100101b to decimal and hexadecimal numeral systems.
  3. ABChex to decimal and binary numeral systems.      

Solution:

  1. Step1: Rule for Decimal to Binary Conversion: Divide by 2 and append the reminders in reversed order.

1234:2=617                 reminder 0

617:2=308                   reminder 1

308:2=154                   reminder 0

154:2=77                     reminder 0

77:2=38                       reminder 1

38:2=19                       reminder 0

19:2=9                          reminder 1

9:2=4                            reminder 1

4:2=2                            reminder 0 

2:2=1                            reminder 0

1:2=0                           reminder 1

        1234d=10011010010b

Step 2: Rule for Decimal to Hexadecimal Conversion: Divide by 16 and append the reminders in reversed order. Hexadecimal numbers (base 16): Represented using 16 numerals:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F

1234:16=77        reminder 2

77:16=4               reminder D

4:16=0             reminder 4

               1234d=4D2hex

2. Step 1: Rule for binary to decimal conversion: Multiply each numeral by its exponent:

1100101b=1*26+1*25+0*24+0*23+1*22+0*21+1*20=64+32+4+1=96+5=101d

Step 2: From decimal to hexadecimal numeral system. Follow the rule above.

        101:16=6             reminder 5.

        6:16=0                reminder 6

101d=65hex

3. Step 1: Rule for Hexadecimal to Decimal Conversion: Multiply each digit by its exponent.

ABChex=10*162+11*161+12*160=2560+176+12=2748d

Step 2: Again using the rule for decimal to binary numeral system conversion.

2748:2=1374              reminder 0

1374:2=687                reminder 0

687:2=343                   reminder 1

343:2=171                   reminder 1

171:2=85                     reminder 1

85:2=42                       reminder 1

42:2=21                       reminder 0

21:2=10                       reminder 1

10:2=5                          reminder 0

5:2=2                            reminder 1

2:2=1                            reminder 0

1:2=0                          reminderr 1

Following the steps from solution to the problem 5.1 we have:

2748d=101010111100b

Problem 6.  Least common Multiple: Find LCM(1234, 3456)

Solution: We have to find the prime dividers of both numbers.

Step 1: 1234:2=617

                Than we, check if 617 is a prime number. Use this: https://primes.utm.edu/lists/small/1000.txt and we see it is.

1234=617*2

Step 2:                 3456:2=1728

               1728:2=864

               864:2=432

               432:2=216

               216:2=108

               108:2=54

               54:2=27

               27:3=9

               9:3=3

               3:3=1

               1

3456=2*2*2*2*2*2*2*3*3*3

Step 3. We write the prime dividers of the first number and add the not repeating prime dividers of the second number. In this case, we have:

LCM(1234, 3456) = 2*617*2*2*2*2*2*2*3*3*3=1234*26*33=1234*64*27=78976*27=2132352

                

9
16/06/2015 16:09:52
DimiturJeliazkov avatar DimiturJeliazkov 25 Точки

Повече от перфектно :)

1
tal4eto+deleted! avatar tal4eto+deleted! 23 Точки

Благодаря. 

Твоето домашно ми помогна доста, с полезните линкове и със сверяване на отговорите после, благодаря. 

0
elizabeth83 avatar elizabeth83 1 Точки

Здравейте, много благодаря за полезните линкове към задачите, много ми помогнаха.

0
butanfire avatar butanfire 32 Точки

Колега, аз лично не харесвам идеята да се постват отговорите във Форумите. Който ти ги поиска ги давай на лично, така се губи идеята.

А идеята е всеки да изтиска максимално себе си и да се постарае/научи нещо ново.

Ако лекторите имаха идея да го правят по този начин - щяха да правят отделна тема с отговори след всяко занятие.

Стана някаква истерия с това домашно - не са минали още 2 дена и се дигна много пара и теми за нищо май :)

 

п.с Решаването на задачите с калкулатори е лесно да, друго е обаче да си драснеш няколко реда код за същото? :)

 

Поздрави,

Владо

2
Snooty7 avatar Snooty7 -1 Точки

Благодаря за линковете. Много са полезни.

0
GeorgiValchev avatar GeorgiValchev 0 Точки

И аз мисля, че отговорите са верни. Аз открих доста интересен сайт за третата задача, който представя отговора като сбор от прости числа.

http://www.numberempire.com/factoringcalculator.php

 

0
23/10/2015 20:39:32
falseuser avatar falseuser 2 Точки

 

 

 

Homework: Math for Developers

This document defines homework assignments from the “C# Basics“ Course @ Software University. Please submit as homework a single txt/doc/docx file holding the answers of all below described problems.

Problem 1.       Some Primes

Find the 24th, 101st and 251st prime number.

24th = 89

101st = 547

251st = 1597

Problem 2.       Some Fibonacci Primes

Check if the 24th, 101st and 251st prime numbers are part of the base Fibonacci number set. What is their position?

The 24th (89) and the 251st (1597) prime numbers are part of the Fibonacci number set.

And their positions are:

24th prime number is 89 and is at position 12th.

251st prime number is 1597 and is at position 18th.

Sources used: http://www.numberplanet.com/tag/prime/ ; http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibtable.html ; Forum of Softuni.bg

Problem 3.       Some Factorials

Find 100!, 171! and 250! Give all digits.

100! = 93, 326, 215, 443, 944, 152, 681, 699, 238, 856, 266, 700, 490, 715, 968, 264, 381, 621, 468, 592, 963, 895, 217, 599, 993, 229, 915, 608, 941, 463, 976, 156, 518, 286, 253, 697, 920, 827, 223, 758, 251, 185, 210, 916, 864, 000, 000, 000, 000, 000, 000, 000, 000

 

171! = 1241018070217667823424840524103103992616605577501693185388951803611996075221691752992751978120487585576464959501670387052809889858690710767331242032218484364310473577889968548278290754541561964852153468318044293239598173696899657235903947616152278558180061176365108428800000000000000000000000000000000000000000

250! = 3232856260909107732320814552024368470994843717673780666747942427112823747555111209488817915371028199450928507353189432926730931712808990822791030279071281921676527240189264733218041186261006832925365133678939089569935713530175040513178760077247933065402339006164825552248819436572586057399222641254832982204849137721776650641276858807153128978777672951913990844377478702589172973255150283241787320658188482062478582659808848825548800000000000000000000000000000000000000000000000000000000000000

Sources Used: http://www.wolframalpha.com/input/?i=250%21 ; http://www.calculatorsoup.com/calculators/discretemathematics/factorials.php

Problem 4.       Calculate Hypotenuse

You are given three right angled triangles. Find the length of their hypotenuses.

  1. Catheti: 3 and 4

Hypotenuse = 5

  1. Catheti:  10 and 12

Hypotenuse = 15.62049935181331

  1. Catheti 100 and 250

Hypotenuse = 269.2582403567252

Problem 5.       Numeral System Conversions

Convert 1234d to binary and hexadecimal numeral systems.

1234/2 = 617 (0)   1234d to binary numeral system is: 10011010010b.

617/2 = 308 (1)

308/2 = 154 (0)

154/2 = 77 (0)

77/2 = 38 (1)

38/2 = 19 (0)

19/2 = 9 (1)

9/2 = 4 (1)

4/2 = 2 (0)

2/2 = 1 (0)

½ = 0 (1)

1234/16 = 77 (2)                1234d = 4D2hex

77/16 = 4 (D)

4/16 = 0 (4)

Convert 1100101b to decimal and hexadecimal numeral systems.

1100101 = 1*26 + 1*25 + 0*24 + 0*23 + 1*22 + 0*21 + 1*20 = 64 + 32 + 4 + 1 = 101d

101/16 = 6 (5)                     101d = 65hex

6/16 = 0 (6)

Convert ABChex to decimal and binary numeral systems.

ABChex = 10*162 + 11*161 + 12*160= 10*256 + 11*16 + 12*1 = 2560 + 176 + 12 = 2748d

2748/2 = 1374 (0)              171/2 = 85 (1)     10/2 = 5 (0)         2748d = 101010111100b

1374/2 = 687 (0)                85/2 = 42 (1)       5/2 = 2 (1)

687/2 = 343 (1)                  42/2 = 21 (0)       2/2 = 1 (0)

343/2 = 171 (1)                  21/2 = 10 (1)       ½ = 0 (1)

Problem 6.       Least Common Multiple

Find LCM(1234, 3456).

Steps:

  1. Decompose all numbers into prime factors:

 

1234/2 = 617

617/617 = 1

 

3456/2 = 1728

1728/2 = 864s

864/2 = 432

432/2 = 216

216/2 = 108

108/2 = 54

54/2 = 27

27/3 = 9

9/3 = 3

3/3 = 1

 

  1. Write the numbers as a result of their prime multiples.

1234 = 617*2

3456 = 27*33

 

  1. Choose the common and uncommon prime factors with the greatest exponent.

 

Common prime factors: 2

Common prime factors with the greatest exponent: 27

Uncommon prime factors: 3, 617

Uncommon prime factors with the greatest exponent: 33, 6171

 

  1. Calculate the LCM

LCM = 27*33*6171 = 128*27*617 = 2132352

 

Source used for Problem 6:

 

0
05/11/2015 12:35:56
EricTaylor avatar EricTaylor 1 Точки
Страхотна работа там!

texttospeech.onl - Преобразуване на текст в реч

mortgagecalculator.tech - налагане на месечна ипотека

0
17/06/2020 08:29:14
DimiturJeliazkov avatar DimiturJeliazkov 25 Точки

Ще бъде поправено :)

0
14/06/2015 14:30:30
Eltimir avatar Eltimir 0 Точки

Как качихте файла не ми позволява нито с Word, Excell, WordPad , ако някой знае да каже ?

0
nikola.ninov avatar nikola.ninov 4 Точки

От престоя ми в ТУ и от гадните електротехники поне научих много добър сайт за изчисления защото имагинерните числа ми излизаха (поне в началото)много тежки,а той е http://www.wolframalpha.com/ давам го като допълнение от предходните коментари.

0
15/06/2015 10:15:36
tal4eto+deleted! avatar tal4eto+deleted! 23 Точки

 

 

                

0
15/06/2015 22:50:05
tal4eto+deleted! avatar tal4eto+deleted! 23 Точки

 

                

0
15/06/2015 22:51:25
Можем ли да използваме бисквитки?
Ние използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Можете да се съгласите с всички или част от тях.
Назад
Функционални
Използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Използваме „сесийни“ бисквитки, за да Ви идентифицираме временно. Те се пазят само по време на активната употреба на услугите ни. След излизане от приложението, затваряне на браузъра или мобилното устройство, данните се трият. Използваме бисквитки, за да предоставим опцията „Запомни Ме“, която Ви позволява да използвате нашите услуги без да предоставяте потребителско име и парола. Допълнително е възможно да използваме бисквитки за да съхраняваме различни малки настройки, като избор на езика, позиции на менюта и персонализирано съдържание. Използваме бисквитки и за измерване на маркетинговите ни усилия.
Рекламни
Използваме бисквитки, за да измерваме маркетинг ефективността ни, броене на посещения, както и за проследяването дали дадено електронно писмо е било отворено.