Unlearning and Relearning
The Rock-P file contains the rock-paper scissors game written using Python, with 1 human player and a computer on the opposite. The Random function generate a random choice by the computer out of rock, paper and scissor. Nested if-else loops are used to declare winners in the various scenarios.
The V2_1 file contains simple python exercises with my own solutions. There are several functions that are used in this file. My fav's the datetime function. Which one's your favourite?
This time my favourite is the last one where I had to break my head over pass and continue. "pass is a null operation; nothing happens when it executes. It's useful as a placeholder in areas of your code where a statement is required syntactically, but no command or code is needed.
continue is used to skip the rest of the current iteration of a loop and move to the next iteration." Also, global keyword and generators are used at places which I enjoyed doing!
{02-10-2024} This is the last file for python basic exercises part - 1.
I found it interesting while trying to code gcd with my own logic. It was so much fun!