Coder Social home page Coder Social logo

guna7222 / learning-python- Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 254 KB

This repo is about learning python from basic to advanced level.

Python 100.00%
python3 python-strings python-variables comments python-operators python-datatypes python-lists python-tuples python-sets python-dictionaries python-conditionals conditional-statements while for-loops

learning-python-'s Introduction

Learning-Python-

This repo is about learning python from basic to advanced level.

What is Python?

ANS:- Python is a general purpose, high level, interpreted, and dynamically typed programming language created by Guido Van Rossum in 1991.

V1

Hello world program ๐Ÿ‘

Capture

Variables ๐Ÿ‘

Variables are containers for storing data values

Assign a value to the variable:-

x = 'Hello World!'

Features of Python ๐Ÿ‘

Features-of-python-01

Is Python programming language or scripting ?

ANS:- Python is capable of scripting but in general sense it is consider as general purpose programming language.

what is PEP8?

ANS:- PEP 8 stands for python enhancement proposal. It is a set of rule that specify how to format python code for maximum readability

what is all() built-in function?

ANS:- The all() function returns True if all elements in the given iterable are true. If not, it returns False. all() function takes a single parameter.

Syntax:- all(iterable)

Capture

[More info about all() function] (https://github.com/guna7222/Learning-Python-/blob/main/functions/built-in%20function/all_function.py)

learning-python-'s People

Contributors

guna7222 avatar thrilokk avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

sumajali

learning-python-'s Issues

Run time error

Runtime Error!

avaliable_menu = "enter 'a' to add a movie, enter 'l' to list a movie, enter 'f' to find the movie:- "
movies = []

def add_movies():
title = input("enter a movie name:- ")
rating = int(input("enter a movie rating:- "))
ticket_price = int(input("enter the ticket price:- "))
movie_hero = input("enter a movie hero name:- ")

movies.append({
    "title":title,
    "rating":rating,
    "ticket_price":ticket_price,
    "movie_hero":movie_hero
})

def listing_movies():
for movie in movies:
print(movie)

def finding_movies():
find_movie = input("enter a movie name to find:- ")
if movie in movies:
if movie["title"] == find_movie:
print(movie)

menu_prompt = input(avaliable_menu)
while menu_prompt != 'q':
if menu_prompt == 'a':
add_movies()
elif menu_prompt == 'l':
listing_movies()
elif menu_prompt == 'f':
finding_movies()

else:
    print("sorry for inconvinence, kindly recheck the values that are entered:) ")

Double lettes

Double letters
The goal of this challenge is to analyze a string to check if it contains two of the same letter in a row. For example, the string "hello" has l twice in a row, while the string "nono" does not have two identical letters in a row.

Define a function named double_letters that takes a single parameter. The parameter is a string. Your function must return True if there are two identical letters in a row in the string, and False otherwise.

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.