Arvutiteaduse instituut
  1. Kursused
  2. 2020/21 sügis
  3. Programmeerimise alused (MTAT.03.236)
EN
Logi sisse

Programmeerimise alused 2020/21 sügis

  • Home
  • Grading
  • Links

Homework 1

The deadline is Sunday, the 13th of September, 23:59 (Estonian time).

You have decided to buy a new TV set and do not know what size is best for you. Write a program that prompts the user for distance from the sofa to the TV set in meters. The program must compute and output the diagonal size of the TV set in inches suitable to your room (use the following formula: diagonal_size = distance * 100 * 0.39 / 2.5). Round the answer (you can use round for that, e.g. round(2.5) gives 3).

The program must compute and output the diagonal size of the TV set in inches suitable to your room.

 Enter distance (m): 4
 The suitable diagonal size is 62 inches.


 Enter distance (m): 2.75
 The suitable diagonal size is 43 inches.

Go to Moodle and upload your solution into Homework 1.

  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused