Cookie Consent by Free Privacy Policy Generator Aktuallisiere deine Cookie Einstellungen ๐Ÿ“Œ day 04


๐Ÿ“š day 04


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

date:- 23 May, 2024.

Randomization:- Computers are deterministic(we are not considering malfunctions etc). They will do what we ask them to do. They can't generate random outputs, even the AI. However, we can produce pseudo-random outputs from them by using large data and complex algorithms. Pseudo as we can still find pattern in the data but it will take significant time to reach that. To generate a random number in Python, we need a 'random module'.

Module:- Often Python projects get so big that it's not possible to maintain all code in one file. To solve this we create different files for different functionality. In a project, main.py is named as the main module. This file will execute first, and other modules will be called from here.
In Python, we are provided with many in-built modules. We save memory by including only those which are required in our program.
To include a python module, we will have to import it into the file where we want to use it.

List:- It's a data structure(way of arranging data). Its syntax is: list_name = [value1, value2]. Each value in it is arranged in order and provided a unique number called an index. The index starts from 0 and is assigned to the leftmost value. We add +1 as we move to the right.
To access the value from the list we write:
list_name[index_of_value] >>value

eg list=[a,b,c,d]
list[0] = a , list[2] = c , list[-1] = d
We can also lists inside a list. eg list=[[a,b,c],[1,2,3]]
list[0][1] = b

String:- like lists, in string, each character is also assigned a unique index.
eg string = "ABC" string[0] >>"A"

Functions I learned today:-

  1. random.randint(a,b) -This will generate a random number between a and b, including a & b.
  2. random.choice(list) -This will return a random value from the list.
  3. list.append(x) - This will add value x at the end of the list. list[-1] = x
  4. list.insert(i,x) - This will insert value x at index i, shift the previous value to right(will change its index also)

Program_for_today: Rock, paper and scissors

rock, paper, scissors game

...



๐Ÿ“Œ Girls' Day und Boys' Day 2016: Warum es der Boys' Day so schwer hat


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Girls' Day und Boys' Day 2016: Warum es der Boys' Day so schwer hat


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Identity Management Day 2022: Not Just One Day, But Every Day


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Identity Management Day 2022: Not Just One Day, But Every Day


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ The Difference Between Day-0, Day-1, and Day-2 Operations


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 30 โ€” IAM


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 20 โ€” VPC Hands-on: Part 2 (VPC Peering)


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 21 โ€” VPC Hands-on โ€” Part 3


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 27 โ€” S3 Hands-on โ€” Part 1


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 32 โ€” CloudWatch


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 34 โ€” CloudFormation


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 35 โ€” CloudFormation โ€” Part 2


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 36 โ€” AWS Services โ€” At a Glance โ€” Part 1


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 36 โ€” AWS Services โ€” At a Glance โ€” Part 2


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 37 โ€” Amazon RDS, RedShift and Aurora โ€” Overview


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 40 โ€” Amazon Aurora


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 38 โ€” Amazon RDS


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 41 โ€” Amazon Aurora โ€” Part 2


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 39 โ€” Amazon RDS โ€” Part 2


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 43 โ€” Amazon Athena


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 42 โ€” Amazon ElastiCache


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 44 โ€” Amazon Elastic Beanstalk


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 45 โ€” AWS Lambda


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 45 โ€” Amazon DynamoDB โ€” Part 1


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Dayโ€Š-โ€ŠDay 46โ€Š-โ€ŠAmazon DynamoDBโ€Š-โ€ŠPart 2


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 47 โ€” Amazon DynamoDB โ€” Part 3


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 48 โ€” Amazon DynamoDB โ€” Part 4


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 49 โ€” Amazon SNS


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 50 โ€” Amazon Simple Notification Service(SNS) โ€” Event Sources


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 51 โ€” Amazon Simple Notification Service(SNS) โ€” Event Destinations


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 52 โ€” Amazon Simple Queue Service (SQS)


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Dayโ€Š-โ€ŠDay 53โ€Š-โ€ŠDifferences between SQS, SNS and Amazonย MQ


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 54 โ€” Amazon SQS queue types


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day - Day 55 - Amazon SQS Standard Queue


๐Ÿ“ˆ 13.34 Punkte

๐Ÿ“Œ Learning AWS Day by Day โ€” Day 57 โ€” Amazon Simple Email Service


๐Ÿ“ˆ 13.34 Punkte











matomo