Giter VIP home page Giter VIP logo

-'s People

-'s Issues

εργασια 1

-- coding: cp1253 --

#οι επαναλαηψεις θα τελειωσουν μολις εισαχθει αρνητικος αριθμος
provata = []
metrisi = input("Give the number of the sheep: ")
while (metrisi >= 0):
provata.append(metrisi)
metrisi = input("Give the number of the sheep: ")
kopadi = input("give the size of the sheep: ")
megethos = len(provata)
synolo = 0
if (provata[megethos - 1] > 1):
for x in provata[megethos - 1]:
synolo = synolo + x
else:
synolo = provata[megethos - 1]
if (synolo > kopadi):
while (synolo > kopadi):
print ("Give the correct number")
kopadi = input("give the size of the sheep: ")
diafora = kopadi - synolo
print ("the number of the missing sheep is: %d" %diafora)

εργασια10

import math
a = 1
b = 1
num = input("give the number: ")
plithos = 0
while ((a+1) < num):
print ("o a einai: %d/n" %a)
while ((a + b) < num):
print ("o b einai: %d" %b)
print ("o a einai: %d" %a)
riza = a2 + b2
c = math.sqrt(riza)
cint = int(c)
if (c == cint):
print ("YES")
sum = a+b+c
if (sum == num):
print ("The Three Numbers are: %d, %d, %d" %(a, b, c))
plithos = plithos + 1
else:
print ("No Numbers")
else:
print("NO")
b = b+1
a = a+1
b = 1

if (plithos == 0):
print ("there is no combination")

εργασια2

amajia = []
maxLengthList = 24
print
while len(amajia) < maxLengthList:
item = input("amaksia: ")
amajia.append(item)
max1=amajia[1]
i=1
while(i<6):
if (amajia[i]>max1):
max1=amajia[i]
i = i+1
max2=amajia[7]
i=7
while(i<12):
if (amajia[i]>max2):
max2=amajia[i]
i = i+1
max3=amajia[13]
i=13
while(i<18):
if (amajia[i]>max3):
max3=amajia[i]
i= i+1
max4=amajia[19]
i=19
while(i<24):
if (amajia[i]>max4):
max4=amajia[i]
i = i+1

apotelesmata = [('4:00pm',max1),('5:00pm',max2),('6:00pm',max3),('7:00pm',max4)]
print apotelesmata

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.