Module 2 4930
Daniel Tafmizi
Dr. Friedman
Lis 4930
May 27, 2024
Module 2
Assignment:
print ('Hello World')
Hello World
String1 = 'Welcome to the Geeks World'
print("String with the use of Single Quotes: ")
print(String1)String with the use of Single Quotes: Welcome to the Geeks World
It seems that the print and string functions work seamlessly. The stringfunction offers a "playground" for modification and structuring. The print function allowsthe user to use the string in their program. The example above shows a simple use case.String1 holds a string, that is later called in the program. More advanced uses of this canbegin handling user data or allow for manipulation techniques.
Notes:
Run python in cmd - I did not run into much trouble. Initially, I could not link the script file to the cmd. I tried typing "python3" and it directed me to a Microsoft store download. After downloading the MS python, I was able to type "python3" and access python through the cmd interpreter.
Starting program - I am using the PyCharm IDE. I believe that this section is asking me to set a directory. I have my directory set to a local folder on my PC named, "Lis4930WeeklyAssign".
Compiler - Turns programming language into usable computer language. Translates source to target.
Interpreter - Executes instructions from a programming language.
punctuation + whitespace.
String formatting through Formatter(); allows you to customize string format
format
(format_string, *args, **kwargs) has an internal dictionary,
vformat
(format_string, args, kwargs) accesses external dictionary
mini language in format() -
Ex:
by position
by name
by attribute
by item
%r vs %s
align and width
+f vs -f vs f
dif bases use #
type specific
args - accessed through tuple
kwargs - accessed through dict
Comments
Post a Comment