- www.firstcontent.in, www.skillschoolonline.com
- @naidulives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x,y = 0,1 | |
while y<1000: | |
print(y) | |
x,y = y,x+y | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L = [] | |
# While loop of L is less than the number mentioned | |
while len(L) < 5: | |
# New name variable declared to ask for input for new name | |
new_name = input("Please add new name?: ").strip().capitalize() | |
# New name is add to the list L by command append | |
L.append(new_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
known_users = ["Sohamm", "Bob", "Claire", "Dan", "Emma", "Fred", "Georgie", "Harry"] | |
print(len(known_users)) | |
print(known_users) | |
while True: | |
print("Hi! My name is Travis") | |
name = input("What is your name?: ").strip().capitalize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
films = { | |
"Finding Dory": [3,5], | |
"Bourne": [18,5], | |
"Tarzan": [15,5], | |
"Ghost Busters": [12,5] | |
} | |
while True: | |
choice = input("What film would you want to watch?: ").strip().title() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Building a pong game | |
#Part_1 Getting Started | |
import turtle | |
import os | |
wn = turtle.Screen() | |
wn.title("Pong by Mahesh Umakanth Naidu") | |
wn.bgcolor("black") |