
So this would print "hello parv" if I input my name. However, with me for some reason whenever I try to code this it just prints hello and doesn't take my input into account. I've looked at a few different tutorials for coding for inputs and every time I try it on IDLE, it doesn't work.
http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/io.html
Also, for some reason, I cannot import any modules. The website I look at for instruction which is directly from the python creators says you just write the keyword import followed by whatever you want to import. However, for some reason, it doesn't recognize the module I am trying to import, it seems like the IDLE program I am using to code is not attached to the python database.
https://docs.python.org/3/reference/import.html
I am starting to think that before I import a module I need to download it. However, now the issue is to find where I download the modules. From what I am currently reading on python, I might even need to download the ability to import.
https://docs.python.org/3/install/index.html?highlight=names%20modules
To do math on python:
From math import (enter math function)
ex)



https://docs.python.org/3.2/library/math.html#module-math
USER INPUT!
FINALLY FIGURED OUT HOW TO MAKE THE CODE TAKE USER INPUT. In order to make a function take user input you must have a question or statement followed by a ; or : or ? or ! some type of open end punctuation. Then you press enter, and beneath you can enter your input. Make sure the input matches the function perfectly.

BOLEAN PLUS USER INPUT

MORE complex Boolean with user input

Testing each of the conditions


https://docs.python.org/3/library/stdtypes.html
Python codes
https://wiki.python.org/moin/SimplePrograms
No comments:
Post a Comment