This file contains 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
#include <unistd.h> | |
#include <stdio.h> | |
#include <sys/socket.h> | |
#include <stdlib.h> | |
#include <netinet/in.h> | |
#include <string.h> | |
int main(){ | |
int sockfd, newSockfd; | |
struct sockaddr_in serv_addr, cli_addr; |
This file contains 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
import numpy as np | |
import matplotlib.pyplot as plt | |
#Carrier wave c(t)=A_c*cos(2*pi*f_c*t) | |
#Modulating wave m(t)=A_m*cos(2*pi*f_m*t) | |
#Modulated wave s(t)=A_c[1+mu*cos(2*pi*f_m*t)]cos(2*pi*f_c*t) | |
A_c = float(input('Enter carrier amplitude: ')) | |
f_c = float(input('Enter carrier frquency: ')) | |
A_m = float(input('Enter message amplitude: ')) |
This file contains 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
from os import close | |
import sys | |
import getopt | |
def add(name, quantity, price): | |
with open('data', 'a') as f: | |
f.write(f"{name}-{quantity}-{price}\n") | |