Skip to content

Instantly share code, notes, and snippets.

Avatar

scugn1zz0

  • Naples, Italy
View GitHub Profile
View 06StringList.py
txtInput = str(input("please enter a palindrome: "))
reversedInput = txtInput[::-1]
if reversedInput == txtInput:
print("good job")
else:
print("you missed it")
@scugn1zz0
scugn1zz0 / ipAddressForLoops.py
Last active Dec 28, 2016
Check if an IP address is entered correctly [no expression, only if, else, for ecc.]
View ipAddressForLoops.py
# ipAddress = input("please enter an ipAddress: ")
ipAddress = "192.168.7.7"
# check if number of dots is 3
numberOfDot = 0
for char in ipAddress:
if char == '.':
numberOfDot += 1
totNumbOfDot = numberOfDot # output of this section is totNumberOfDot, to be checked at the end
View 05ListOverlap.py
# and write a program that returns a list that contains only the elements that are common between the
# lists (without duplicates). Make sure your program works on two lists of different sizes.
# exercise from http://www.practicepython.org/exercise/2014/03/05/05-list-overlap.html
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
c = []
# Create list c
for num in a:
@scugn1zz0
scugn1zz0 / main.dart
Created Apr 1, 2020
Class exploration in Dart - skinny dude section 2 up until video 25
View main.dart
/// Main
void main() {
final personOne = Person(name: "Mario", age: 23, height: 1.83);
print(personOne.describePerson());
final employeeOne = Employee(
name: "Mario",
age: 23,
height: 1.83,
You can’t perform that action at this time.