Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/Programming_with_python_2021.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

245 changes: 245 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Part1-Basics/c_own_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import sys
# depending on the complexity of your script you will have a longer list of libraries

sys.stdout.write("This is an script with three sections \n\n")
sys.stdout.write("THIS IS A NEW TEXT\n")
sys.stdout.write("Header section using '#' characters\n")
sys.stdout.write("library section using import/from ... import commands\n")
sys.stdout.write("Code section calling the 'sys' library to show you this text\n")
4 changes: 2 additions & 2 deletions Part1-Basics/d_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# Let's write our code

# Let's create two variables and assign them two values
i_am_a_variable = 1
i_am_another_variable = 2
i_am_a_variable = 23
i_am_another_variable = 1

# Let's assign the result of an operation to a third variable
i_store_the_result = i_am_a_variable + i_am_another_variable
Expand Down
38 changes: 38 additions & 0 deletions SIMONE GRASSO/Conditionals.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##################################################
# Author: Simone Grasso
# Copyright: Copyright 2020, IAAC
# Credits: [Institute for Advanced Architecture of Catalonia - IAAC, Advanced Architecture group]
# License: Apache License Version 2.0
# Version: 1.0.0
# Maintainer: Simone Grasso
# Email: simone.grasso@students.iaac.net
# Status: student
##################################################

# End of header section

my_previous_city_name = 'Catania'
my_previous_city_population = 1116000

my_city_name = 'Barcelona'
my_city_population = 5500000

if my_city_population > 10000000:
print('my city is a megacity')
elif my_city_population > 1500000:
print('my city is a large metropolitan area')
if my_city_population > my_previous_city_population:
print ('my city is bigger than the previous')
else:
print('my previous city is bigger than the current city')
elif my_city_population > 500000:
print('my city is a metropolitan area')
elif my_city_population > 200000:
print('my city is a medium size urban area')
elif my_city_population > 50000:
print('my city is a small urban area')
else:
print('my city is neither a mega city nor a large metropolitan area')

print('end of script')

26 changes: 26 additions & 0 deletions SIMONE GRASSO/Robot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
##################################################
# Author: Simone Grasso
# Copyright: Copyright 2020, IAAC
# Credits: [Institute for Advanced Architecture of Catalonia - IAAC, Advanced Architecture group]
# License: Apache License Version 2.0
# Version: 1.0.0
# Maintainer: Simone Grasso
# Email: simone.grasso@students.iaac.net
# Status: student
##################################################

d_distance = float(2.0)

#DeltaX = variazione di distanza in movimento

if d_distance > 10:
print('fast è la velocità''3 è il DeltaX')
elif d_distance > 5:
print('same speed è la velocità''3 è il DeltaX')
elif 3 < d_distance < 6:
print('slow è la velocità ' ' 1.5 è il DeltaX')
elif d_distance <= 3:
print('stop')



17 changes: 17 additions & 0 deletions SIMONE GRASSO/loop exc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
print('lets print a series of number')

print('......................')
print('you can also use the counter value as part of internal functions')

text = 'this is an interection value: '

for i in range (11, 20, 3):
print (text + str(i))

print('................')
print('you can also create some shapes: ')

text = '$'
character = ' "_"$£'
for i in range(1, 10):
print('text' + 'character')
Loading